]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: tolerate no snaprealm encoded in on-disk root inode 32079/head
authorYan, Zheng <zyan@redhat.com>
Thu, 7 Nov 2019 08:15:07 +0000 (16:15 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 6 Dec 2019 13:32:33 +0000 (14:32 +0100)
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: https://tracker.ceph.com/issues/42675
(cherry picked from commit 141eddba068dd2dc5afe783c21b4af751306d281)

src/mds/CInode.cc

index 6c8084bb0a4d7f99bae5952b0645cde17f5c126c..3209763b7b075f1f9995430f4689a92ec585ba58 100644 (file)
@@ -2817,7 +2817,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);
   }