]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/FSMap: use DECODE_OLDEST to gate FSMap version
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 15 Jul 2021 00:55:40 +0000 (17:55 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 29 Jul 2021 15:57:34 +0000 (08:57 -0700)
This throws a proper exception which can be handled.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 47a8273faebf66737673af4fa04a58ac3628cdf3)

src/mds/FSMap.cc

index 2a3c674e92465e50833f5b2eae8780879525ea46..cdd2a8922151eb6816093c46f01774dc9ba4a47a 100644 (file)
@@ -644,8 +644,7 @@ void FSMap::encode(bufferlist& bl, uint64_t features) const
 void FSMap::decode(bufferlist::const_iterator& p)
 {
   DECODE_START(7, p);
-  if (struct_v <= 6)
-    ceph_abort("detected old mdsmap in mon stores");
+  DECODE_OLDEST(7);
   decode(epoch, p);
   decode(next_filesystem_id, p);
   decode(legacy_client_fscid, p);