From: Yan, Zheng Date: Fri, 5 Apr 2013 05:58:36 +0000 (+0800) Subject: mds: fix session_info_t decoding X-Git-Tag: v0.61~204^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a1d9cbe5af25dc7e6b5ce81ff08c854c7ee0187b;p=ceph.git 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 --- diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc index ad4a71acba56..b1ce640a539c 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());