From 23fa3b726368f036b31e53a0bec8ad4bc654d993 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Tue, 3 Oct 2017 12:23:03 -0700 Subject: [PATCH] mds: reduce variable scope Signed-off-by: Patrick Donnelly (cherry picked from commit 37884a419640b446fffc1fa4d6074c97339fdd96) --- src/mds/FSMap.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index 95e78b23425..cf72ce040ec 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); -- 2.47.3