]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix false 'bad backtrace' warnings during online scrub 11517/head
authorYan, Zheng <zyan@redhat.com>
Mon, 17 Oct 2016 07:30:20 +0000 (15:30 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 17 Oct 2016 07:42:27 +0000 (15:42 +0800)
Only inode's direct parent in backtrace is supposed to be uptodate.
The rest back pointers in backtrace are hints, they can be stale.
The scrub code prints warning when inode's on-disk backtrace is
not equivalent to inode's current path. This check is too strange,
it causes lots of false warnings for workload that does directory
rename.

Fixes: http://tracker.ceph.com/issues/17562
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/CInode.cc

index 5dcdcb1577f2fabe64ba92f937131b9d427d140e..feb4530c5741c08424668ca02c51d401e54878fe 100644 (file)
@@ -3840,15 +3840,11 @@ void CInode::validate_disk_state(CInode::validated_data *results,
       memory_newer = memory_backtrace.compare(results->backtrace.ondisk_value,
                                              &equivalent, &divergent);
 
-      if (equivalent) {
-        results->backtrace.passed = true;
+      if (divergent || memory_newer < 0) {
+       // we're divergent, or on-disk version is newer
+       results->backtrace.error_str << "On-disk backtrace is divergent or newer";
       } else {
-        if (divergent || memory_newer <= 0) {
-          // we're divergent, or don't have a newer version to write
-          results->backtrace.error_str <<
-              "On-disk backtrace is divergent or newer";
-         goto next;
-        }
+        results->backtrace.passed = true;
       }
 next:
       // If the inode's number was free in the InoTable, fix that