From 162e25ec04e5288608718dcbd9d57b8234c17fb9 Mon Sep 17 00:00:00 2001 From: John Spray Date: Wed, 25 Oct 2017 05:24:03 -0400 Subject: [PATCH] mds: cleaner scrub complete log msg 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 (cherry picked from commit 5fd00a6e1b914880ab9f401faf591e73024f18ef) --- src/mds/CInode.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index b0a2bcf5f1de9..1144fce1cb235 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -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() << "'"; + } } } -- 2.39.5