]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: fail to mount if journal open fails
authorSage Weil <sage@newdream.net>
Fri, 30 Apr 2010 04:43:07 +0000 (21:43 -0700)
committerSage Weil <sage@newdream.net>
Fri, 30 Apr 2010 04:43:12 +0000 (21:43 -0700)
Clean up error reporting too.

src/os/FileStore.cc
src/os/JournalingObjectStore.cc

index 6855d63441d1e291ecf7f29f65821eb9ad661aab..9d68d543c52b1a069c0dd8e72ef429476377cf2b 100644 (file)
@@ -678,8 +678,12 @@ int FileStore::mount()
   // journal
   open_journal();
   r = journal_replay(initial_op_seq);
-  if (r == -EINVAL) {
-    dout(0) << "mount got EINVAL on journal open, not mounting" << dendl;
+  if (r < 0) {
+    char buf[40];
+    dout(0) << "mount failed to open journal " << journalpath << ": "
+           << strerror_r(-r, buf, sizeof(buf)) << dendl;
+    cerr << "mount failed to open journal " << journalpath << ": "
+        << strerror_r(-r, buf, sizeof(buf)) << std::endl;
     return r;
   }
   journal_start();
index ecafdce6a7160863c50cb774b6a7c4ce46376187..7203d7826ce2ce9d63b107a7e7ba49f0a8a71aec 100644 (file)
@@ -37,8 +37,8 @@ int JournalingObjectStore::journal_replay(__u64 fs_op_seq)
   int err = journal->open(op_seq+1);
   if (err < 0) {
     char buf[80];
-    dout(3) << "journal_replay open failed with" << err
-           << " " << strerror_r(err, buf, sizeof(buf)) << dendl;
+    dout(3) << "journal_replay open failed with " 
+           << strerror_r(-err, buf, sizeof(buf)) << dendl;
     delete journal;
     journal = 0;
     return err;