]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: fix wrong decode logic of nid_max
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 26 Jan 2016 14:22:49 +0000 (22:22 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 2 Feb 2016 06:04:17 +0000 (14:04 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 2abf6b5cd3ba0239021a0466cdfc3e4fc55952e0..0b86b055e460665e2fe3001e973a81e82a3b900f 100644 (file)
@@ -3376,8 +3376,9 @@ int BlueStore::_open_super_meta()
     nid_max = 0;
     bufferlist bl;
     db->get(PREFIX_SUPER, "nid_max", &bl);
+    bufferlist::iterator p = bl.begin();
     try {
-      ::decode(nid_max, bl);
+      ::decode(nid_max, p);
     } catch (buffer::error& e) {
     }
     dout(10) << __func__ << " old nid_max " << nid_max << dendl;