From: Patrick Donnelly Date: Tue, 3 Oct 2017 19:23:03 +0000 (-0700) Subject: mds: reduce variable scope X-Git-Tag: v13.0.1~438^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=37884a419640b446fffc1fa4d6074c97339fdd96;p=ceph.git mds: reduce variable scope Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index 95e78b2342573..cf72ce040ec93 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -431,17 +431,17 @@ void FSMap::encode(bufferlist& bl, uint64_t features) const void FSMap::decode(bufferlist::iterator& p) { - // Because the mon used to store an MDSMap where we now - // store an FSMap, FSMap knows how to decode the legacy - // MDSMap format (it never needs to encode it though). - MDSMap legacy_mds_map; - // The highest MDSMap encoding version before we changed the // MDSMonitor to store an FSMap instead of an MDSMap was // 5, so anything older than 6 is decoded as an MDSMap, // and anything newer is decoded as an FSMap. DECODE_START_LEGACY_COMPAT_LEN_16(7, 4, 4, p); if (struct_v < 6) { + // Because the mon used to store an MDSMap where we now + // store an FSMap, FSMap knows how to decode the legacy + // MDSMap format (it never needs to encode it though). + MDSMap legacy_mds_map; + // Decoding an MDSMap (upgrade) ::decode(epoch, p); ::decode(legacy_mds_map.flags, p);