]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
jewel: osd: pg_pool_t::encode(): be compatible with Hammer <= 0.94.6 14392/head
authorAlexey Sheplyakov <asheplyakov@mirantis.com>
Fri, 7 Apr 2017 08:34:20 +0000 (12:34 +0400)
committerAlexey Sheplyakov <asheplyakov@mirantis.com>
Tue, 20 Jun 2017 14:04:48 +0000 (18:04 +0400)
This patch is necessary for Jewel only since direct upgrades from Hammer
to Kraken and newer are not supported.

Fixes: http://tracker.ceph.com/issues/19508
Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
src/osd/osd_types.cc

index 0540f646373edf6503da48c93b9479565c09bd0e..1c07d31c581699bc90aa53bb1687b2a8ba54a8e0 100644 (file)
@@ -1506,6 +1506,12 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const
     // this was the first post-hammer thing we added; if it's missing, encode
     // like hammer.
     v = 21;
+    if (!(features & CEPH_FEATURE_OSD_HITSET_GMT)) {
+      // CEPH_FEATURE_OSD_HITSET_GMT requires pg_pool_t v21 which has
+      // use_gmt_hitset, and two fields added before v21.
+      // See http://tracker.ceph.com/issues/19508
+      v = 17;
+    }
   }
 
   ENCODE_START(v, 5, bl);