From 8060afd77cfcdda0c6e83b0674343772793c1abe Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Wed, 22 Jan 2014 17:33:39 +0200 Subject: [PATCH] MOSDMap: reencode maps if target doesn't have OSDMAP_ENC 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 --- src/messages/MOSDMap.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/messages/MOSDMap.h b/src/messages/MOSDMap.h index cd4a9519e1d..7ed601c6b36 100644 --- a/src/messages/MOSDMap.h +++ b/src/messages/MOSDMap.h @@ -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