]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: reencode MDSMap in MMDSMap if MDSENC feature is not present
authorSage Weil <sage@inktank.com>
Sun, 24 Feb 2013 00:36:36 +0000 (16:36 -0800)
committerSage Weil <sage@inktank.com>
Sun, 24 Feb 2013 00:36:52 +0000 (16:36 -0800)
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 <sage@inktank.com>
src/messages/MMDSMap.h

index 42bb98f54e1c08f6b35ea61a90615c49d5d18191..66566d01d31322461ae66b151457995eb504ca0e 100644 (file)
@@ -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);