mirror of
https://github.com/ceph/ceph
synced 2025-01-02 00:52:22 +00:00
Merge pull request #14073 from liewegas/wip-bluestore-nullptr
os/bluestore: avoid nullptr in bluestore_extent_ref_map_t::bound_encode Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
8275fda6de
@ -224,10 +224,12 @@ struct bluestore_extent_ref_map_t {
|
||||
|
||||
void bound_encode(size_t& p) const {
|
||||
denc_varint((uint32_t)0, p);
|
||||
size_t elem_size = 0;
|
||||
denc_varint_lowz((uint32_t)0, p);
|
||||
((const record_t*)nullptr)->bound_encode(elem_size);
|
||||
p += elem_size * ref_map.size();
|
||||
if (!ref_map.empty()) {
|
||||
size_t elem_size = 0;
|
||||
denc_varint_lowz((uint64_t)0, elem_size);
|
||||
ref_map.begin()->second.bound_encode(elem_size);
|
||||
p += elem_size * ref_map.size();
|
||||
}
|
||||
}
|
||||
void encode(bufferlist::contiguous_appender& p) const {
|
||||
uint32_t n = ref_map.size();
|
||||
|
Loading…
Reference in New Issue
Block a user