We forego decoding compatibility by older code by dropping
compat_v and len. We have to keep struct_v per blob here because
decode doesn't have a feature bit argument (yet?).
Signed-off-by: Sage Weil <sage@redhat.com>
DENC_HELPERS;
void bound_encode(size_t& p) const {
- p += 2 + 4;
+ p += 1;
denc(extents, p);
denc_varint(flags, p);
denc_varint(sbid, p);
denc(csum_data, p);
p += sizeof(unsigned long long);
}
+
void encode(bufferlist::contiguous_appender& p) const {
- DENC_START(1, 1, p);
+ __u8 struct_v = 1;
+ denc(struct_v, p);
denc(extents, p);
denc_varint(flags, p);
if (is_shared()) {
if (has_unused()) {
denc(unused_uint_t(unused.to_ullong()), p);
}
- DENC_FINISH(p);
}
+
void decode(bufferptr::iterator& p) {
- DENC_START(1, 1, p);
+ __u8 struct_v;
+ denc(struct_v, p);
+ assert(struct_v == 1);
denc(extents, p);
denc_varint(flags, p);
if (is_shared()) {
denc(val, p);
unused = unused_t(val);
}
- DENC_FINISH(p);
}
bool can_split() const {