]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix session_info_t decoding 213/head
authorYan, Zheng <zheng.z.yan@intel.com>
Fri, 5 Apr 2013 05:58:36 +0000 (13:58 +0800)
committerGreg Farnum <greg@inktank.com>
Wed, 10 Apr 2013 19:46:30 +0000 (12:46 -0700)
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>
src/mds/mdstypes.cc

index ad4a71acba56ae0a76e40908324b81dff538c022..b1ce640a539cc131d776b2a7011c70e2f1d4a2c3 100644 (file)
@@ -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());