From: Sage Weil Date: Fri, 30 Apr 2010 04:43:07 +0000 (-0700) Subject: filestore: fail to mount if journal open fails X-Git-Tag: v0.22~603 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0cb8ad43d9943a6182da1d21fa53cbcb8d55ee1c;p=ceph.git filestore: fail to mount if journal open fails Clean up error reporting too. --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 6855d63441d1..9d68d543c52b 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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(); diff --git a/src/os/JournalingObjectStore.cc b/src/os/JournalingObjectStore.cc index ecafdce6a716..7203d7826ce2 100644 --- a/src/os/JournalingObjectStore.cc +++ b/src/os/JournalingObjectStore.cc @@ -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;