]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filejournal: make less noise about open failures
authorSage Weil <sage@inktank.com>
Fri, 15 Jun 2012 21:48:22 +0000 (14:48 -0700)
committerSage Weil <sage@inktank.com>
Fri, 15 Jun 2012 21:48:22 +0000 (14:48 -0700)
The callers report errors and pass up errors, so do not spam stderr with
this.  Fixes the confusion that sparked #2595.

Signed-off-by: Sage Weil <sage@inktank.com>
src/os/FileJournal.cc
src/os/FileStore.cc

index 4366f046e4da83ddfc74b86667f98d005ea5571f..2a832d74da30f030d64a38e219d3916dfd8b72fb 100644 (file)
@@ -73,8 +73,8 @@ int FileJournal::_open(bool forwrite, bool create)
   fd = TEMP_FAILURE_RETRY(::open(fn.c_str(), flags, 0644));
   if (fd < 0) {
     int err = errno;
-    derr << "FileJournal::_open: unable to open journal: open() failed: "
-        << cpp_strerror(err) << dendl;
+    dout(2) << "FileJournal::_open: unable to open journal: open() failed: "
+           << cpp_strerror(err) << dendl;
     return -err;
   }
 
index 2e5f86fe4391f981cb1afa17ff54fe309f8c74b5..db4b1a43c4294b024de13ceb05b5b80bd4e3a8d5 100644 (file)
@@ -1112,7 +1112,8 @@ int FileStore::mkjournal()
     if (ret < 0) {
       ret = journal->create();
       if (ret)
-       dout(0) << "mkjournal error creating journal on " << journalpath << dendl;
+       dout(0) << "mkjournal error creating journal on " << journalpath
+               << ": " << cpp_strerror(ret) << dendl;
       else
        dout(0) << "mkjournal created journal on " << journalpath << dendl;
     }