hobject_t: encode max properly

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2011-12-05 11:25:09 -08:00 committed by Samuel Just
parent 0807e7d523
commit 322f93a2f7

View File

@ -330,12 +330,13 @@ public:
}
void encode(bufferlist& bl) const {
__u8 version = 1;
__u8 version = 2;
::encode(version, bl);
::encode(key, bl);
::encode(oid, bl);
::encode(snap, bl);
::encode(hash, bl);
::encode(max, bl);
}
void decode(bufferlist::iterator& bl) {
__u8 version;
@ -345,6 +346,10 @@ public:
::decode(oid, bl);
::decode(snap, bl);
::decode(hash, bl);
if (version >= 2)
::decode(max, bl);
else
max = false;
}
};
WRITE_CLASS_ENCODER(hobject_t)