summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-04-05 13:58:36 +0800
committerGreg Farnum <greg@inktank.com>2013-04-10 12:46:30 -0700
commita1d9cbe5af25dc7e6b5ce81ff08c854c7ee0187b (patch)
treeafbac0dd7083a019f8a0ef195f70b8083f09621b
parent4b656730ffff21132f358c2b9a63504dfbf0998d (diff)
downloadceph-a1d9cbe5af25dc7e6b5ce81ff08c854c7ee0187b.tar.gz
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 <zheng.z.yan@intel.com> Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r--src/mds/mdstypes.cc4
1 files 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<tid_t> s;
- ::decode(completed_requests, p);
+ ::decode(s, p);
while (!s.empty()) {
completed_requests[*s.begin()] = inodeno_t();
s.erase(s.begin());