]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: tolerate no snaprealm encoded in on-disk root inode
authorYan, Zheng <zyan@redhat.com>
Thu, 7 Nov 2019 08:15:07 +0000 (16:15 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 7 Nov 2019 08:16:10 +0000 (16:16 +0800)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/42675
src/mds/CInode.cc

index e3c4ef1e24af6ea213ef2df15e33778361ac5fc3..ef00696cee7f85af5b38e457fcb4b1cf370e27cf 100644 (file)
@@ -3018,7 +3018,8 @@ void CInode::decode_snap_blob(const bufferlist& snapbl)
       }
     }
     dout(20) << __func__ << " " << *snaprealm << dendl;
-  } else if (snaprealm) {
+  } else if (snaprealm &&
+            !is_root() && !is_mdsdir()) { // see https://tracker.ceph.com/issues/42675
     ceph_assert(mdcache->mds->is_any_replay());
     snaprealm->merge_to(NULL);
   }