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 <john.spray@redhat.com>
This commit is contained in:
John Spray 2017-10-25 05:24:03 -04:00
parent 42b2cc1a2a
commit 5fd00a6e1b

View File

@ -4449,7 +4449,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() << "'";
}
}
}