]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: cleaner scrub complete log msg
authorJohn Spray <john.spray@redhat.com>
Wed, 25 Oct 2017 09:24:03 +0000 (05:24 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 6 Feb 2018 17:50:00 +0000 (09:50 -0800)
People often are not using a tag with their scrub,
let's not have the ugly "with tag ''" in that case.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 5fd00a6e1b914880ab9f401faf591e73024f18ef)

src/mds/CInode.cc

index b0a2bcf5f1de96da8ae915bb61324efbf2a14cd1..1144fce1cb23584d18dbec952eed0d9b9a87dcec 100644 (file)
@@ -4446,7 +4446,12 @@ void CInode::scrub_finished(MDSInternalContextBase **c) {
   if (scrub_infop->header->get_origin() == this) {
     // We are at the point that a tagging scrub was initiated
     LogChannelRef clog = mdcache->mds->clog;
-    clog->info() << "scrub complete with tag '" << scrub_infop->header->get_tag() << "'";
+    if (scrub_infop->header->get_tag().empty()) {
+      clog->info() << "scrub complete";
+    } else {
+      clog->info() << "scrub complete with tag '"
+                   << scrub_infop->header->get_tag() << "'";
+    }
   }
 }