]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: improve debug message for CInode::validate_disk_state
authorYan, Zheng <zyan@redhat.com>
Tue, 16 Feb 2016 09:23:12 +0000 (17:23 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 7 Mar 2016 07:59:13 +0000 (15:59 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CInode.cc

index dcafcf72b680993f06f1d0e52847dad5f9924a39..f6b6c7f9ffb3df09e5ac459a210b112a02e0374d 100644 (file)
@@ -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)