From: Yan, Zheng Date: Tue, 16 Feb 2016 09:23:12 +0000 (+0800) Subject: mds: improve debug message for CInode::validate_disk_state X-Git-Tag: v10.1.0~176^2~1^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=aa1477f1bc596b8bfb43658e2640e363394f2592;p=ceph.git mds: improve debug message for CInode::validate_disk_state Signed-off-by: Yan, Zheng --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index dcafcf72b68..f6b6c7f9ffb 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -3939,8 +3939,14 @@ next: if (dir->scrub_infop && dir->scrub_infop->pending_scrub_error) { dir->scrub_infop->pending_scrub_error = false; - results->raw_stats.error_str - << "dirfrag(" << p->first << ") has bad stats; "; + if (dir->scrub_infop->header && + dir->scrub_infop->header->repair) { + results->raw_stats.error_str + << "dirfrag(" << p->first << ") has bad stats (will be fixed); "; + } else { + results->raw_stats.error_str + << "dirfrag(" << p->first << ") has bad stats; "; + } frags_errors++; } } @@ -3948,12 +3954,16 @@ next: // ...and that their sum matches our inode settings if (!dir_info.same_sums(in->inode.dirstat) || !nest_info.same_sums(in->inode.rstat)) { - results->raw_stats.error_str - << "freshly-calculated rstats don't match existing ones"; if (in->scrub_infop && in->scrub_infop->header && - in->scrub_infop->header->repair) + in->scrub_infop->header->repair) { + results->raw_stats.error_str + << "freshly-calculated rstats don't match existing ones (will be fixed)"; in->mdcache->repair_inode_stats(in); + } else { + results->raw_stats.error_str + << "freshly-calculated rstats don't match existing ones"; + } goto next; } if (frags_errors > 0)