From a1d9cbe5af25dc7e6b5ce81ff08c854c7ee0187b Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Fri, 5 Apr 2013 13:58:36 +0800 Subject: [PATCH] mds: fix session_info_t decoding commit 0bcf2ac081 changes session_info_t's format, but there is a typo in the code that decodes old format. We also need to handle struct_v == 1, which had the same encoding but without the size guards (which is all handled by DECODE_START_LEGACY_COMPAT). Signed-off-by: Yan, Zheng Signed-off-by: Greg Farnum --- src/mds/mdstypes.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc index ad4a71acba5..b1ce640a539 100644 --- a/src/mds/mdstypes.cc +++ b/src/mds/mdstypes.cc @@ -541,9 +541,9 @@ void session_info_t::decode(bufferlist::iterator& p) { DECODE_START_LEGACY_COMPAT_LEN(3, 2, 2, p); ::decode(inst, p); - if (struct_v == 2) { + if (struct_v <= 2) { set s; - ::decode(completed_requests, p); + ::decode(s, p); while (!s.empty()) { completed_requests[*s.begin()] = inodeno_t(); s.erase(s.begin()); -- 2.47.3