]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ost: object_info_t: decode old versions correctly
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 3 Dec 2010 00:53:44 +0000 (16:53 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 3 Dec 2010 00:56:48 +0000 (16:56 -0800)
object_info_t has one constructor that initializes everything from a
bufferlist. This means that the decode function needs to give default
values to fields in object_info_t that aren't found in the bufferlist.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/osd/osd_types.h

index 26619f54566a20d14b8280e6a25a59a67850df9d..7c3a1e5aa8c42c0e4ffb3768b68c3f13af0384ef 100644 (file)
@@ -1347,6 +1347,8 @@ struct object_info_t {
     ::decode(truncate_size, bl);
     if (v >= 3)
       ::decode(lost, bl);
+    else
+      lost = false;
   }
   void decode(bufferlist& bl) {
     bufferlist::iterator p = bl.begin();