]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: check inode's direct parent in inode_backtrace_t::compare
authorYan, Zheng <zyan@redhat.com>
Mon, 17 Oct 2016 06:15:21 +0000 (14:15 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 17 Oct 2016 06:23:34 +0000 (14:23 +0800)
inode's direct parents must be equivalent for non-divergent
backtraces

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/inode_backtrace.cc

index bde2145ebf247df7e4718fed0c07082b153e16e2..37c052982e9a0be6b103274443703b8f09d274c8 100644 (file)
@@ -130,6 +130,8 @@ int inode_backtrace_t::compare(const inode_backtrace_t& other,
     comparator = 1;
   else if (ancestors[0].version < other.ancestors[0].version)
     comparator = -1;
+  if (ancestors[0].dirino != other.ancestors[0].dirino)
+    *divergent = true;
   for (int i = 1; i < min_size; ++i) {
     if (*divergent) {
       /**