From 0cd215ee5b4768012041006377e10eeff53de7b0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 23 Feb 2013 16:36:36 -0800 Subject: [PATCH] mds: reencode MDSMap in MMDSMap if MDSENC feature is not present In some cases the MMDSMap message from mon -> client passes from leader -> peon -> client, and the leader doesn't encode with the correct feature bits. As with MMOSDMap, we reencode the nested MDSMap based on the features if relevant bits are not present. We forgot to include this with the mds encoding changes. Signed-off-by: Sage Weil --- src/messages/MMDSMap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/messages/MMDSMap.h b/src/messages/MMDSMap.h index 42bb98f54e1..66566d01d31 100644 --- a/src/messages/MMDSMap.h +++ b/src/messages/MMDSMap.h @@ -82,7 +82,8 @@ public: void encode_payload(uint64_t features) { ::encode(fsid, payload); ::encode(epoch, payload); - if ((features & CEPH_FEATURE_PGID64) == 0) { + if ((features & CEPH_FEATURE_PGID64) == 0 || + (features & CEPH_FEATURE_MDSENC) == 0) { // reencode for old clients. MDSMap m; m.decode(encoded); -- 2.47.3