From 1e899d08e61bbba0af6f3600b6bc9a5fc9e5c2e9 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 15 Jun 2012 14:48:22 -0700 Subject: [PATCH] filejournal: make less noise about open failures 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 --- src/os/FileJournal.cc | 4 ++-- src/os/FileStore.cc | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/os/FileJournal.cc b/src/os/FileJournal.cc index 4366f046e4da8..2a832d74da30f 100644 --- a/src/os/FileJournal.cc +++ b/src/os/FileJournal.cc @@ -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; } diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 2e5f86fe4391f..db4b1a43c4294 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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; } -- 2.39.5