mirror of
https://github.com/ceph/ceph
synced 2025-04-09 19:26:08 +00:00
os: new encoding for hobject_t
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
parent
7d85c48129
commit
cb15eb8826
@ -5,28 +5,28 @@
|
|||||||
|
|
||||||
void hobject_t::encode(bufferlist& bl) const
|
void hobject_t::encode(bufferlist& bl) const
|
||||||
{
|
{
|
||||||
__u8 version = 2;
|
ENCODE_START(3, 3, bl);
|
||||||
::encode(version, bl);
|
|
||||||
::encode(key, bl);
|
::encode(key, bl);
|
||||||
::encode(oid, bl);
|
::encode(oid, bl);
|
||||||
::encode(snap, bl);
|
::encode(snap, bl);
|
||||||
::encode(hash, bl);
|
::encode(hash, bl);
|
||||||
::encode(max, bl);
|
::encode(max, bl);
|
||||||
|
ENCODE_FINISH(bl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hobject_t::decode(bufferlist::iterator& bl)
|
void hobject_t::decode(bufferlist::iterator& bl)
|
||||||
{
|
{
|
||||||
__u8 version;
|
DECODE_START_LEGACY_COMPAT_LEN(3, 3, 3, bl);
|
||||||
::decode(version, bl);
|
if (struct_v >= 1)
|
||||||
if (version >= 1)
|
|
||||||
::decode(key, bl);
|
::decode(key, bl);
|
||||||
::decode(oid, bl);
|
::decode(oid, bl);
|
||||||
::decode(snap, bl);
|
::decode(snap, bl);
|
||||||
::decode(hash, bl);
|
::decode(hash, bl);
|
||||||
if (version >= 2)
|
if (struct_v >= 2)
|
||||||
::decode(max, bl);
|
::decode(max, bl);
|
||||||
else
|
else
|
||||||
max = false;
|
max = false;
|
||||||
|
DECODE_FINISH(bl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void hobject_t::dump(Formatter *f) const
|
void hobject_t::dump(Formatter *f) const
|
||||||
|
Loading…
Reference in New Issue
Block a user