]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
MOSDMap: reencode maps if target doesn't have OSDMAP_ENC 1126/head
authorIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 22 Jan 2014 15:33:39 +0000 (17:33 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Wed, 22 Jan 2014 15:34:31 +0000 (17:34 +0200)
Reencode both full and incremental maps if target doesn't know how to
decode OSDMAP_ENC maps (CEPH_FEATURE_OSDMAP_ENC bit is not set).  This
fixes a compatibility bug that was introduced in 3d7c69fb0986 ("OSDMap:
add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding").

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/messages/MOSDMap.h

index cd4a9519e1d5cf53605667e7d55e08156726ff5f..7ed601c6b365e921021ccaa7f6d546eb96e2511b 100644 (file)
@@ -86,11 +86,12 @@ public:
     ::encode(fsid, payload);
     if ((features & CEPH_FEATURE_PGID64) == 0 ||
        (features & CEPH_FEATURE_PGPOOL3) == 0 ||
-       (features & CEPH_FEATURE_OSDENC) == 0) {
+       (features & CEPH_FEATURE_OSDENC) == 0 ||
+        (features & CEPH_FEATURE_OSDMAP_ENC) == 0) {
       if ((features & CEPH_FEATURE_PGID64) == 0 ||
          (features & CEPH_FEATURE_PGPOOL3) == 0)
        header.version = 1;  // old old_client version
-      else
+      else if ((features & CEPH_FEATURE_OSDENC) == 0)
        header.version = 2;  // old pg_pool_t
 
       // reencode maps using old format