From: Mark Nelson Date: Thu, 28 Jul 2016 14:53:01 +0000 (-0500) Subject: Merge pull request #9988 from ifed01/wip-bluestore-reduce-blob4 X-Git-Tag: ses5-milestone5~268 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8c0e344abd157b04e72b4e7f6f7b31e2ee9957d;p=ceph.git Merge pull request #9988 from ifed01/wip-bluestore-reduce-blob4 os/bluestore: get rid off blob's ref_map for non-shared objects Mark's Comments: This passed Jenkins checks. This PR did not appear to have a significant impact on performance tests. This initially failed "ceph_test_objectstore --gtest_filter=*/2" segfaulting in one of the tests. See the attached log in the comments for the PR for details. Subsequent reruns passed, and a run through valgrind's memcheck also passed. Igor indicated that he has seen this particular segfault previously and believes it is related to running out of memory. Given that the PR has passed the object store tests multiple times and the segfault has been observed in the past, I believe this PR is unrelated. Reviewed-by: Mark Nelson --- f8c0e344abd157b04e72b4e7f6f7b31e2ee9957d diff --cc src/os/bluestore/bluestore_types.cc index e7d96348192,41aa3ec9380..dfec95a1fcf --- a/src/os/bluestore/bluestore_types.cc +++ b/src/os/bluestore/bluestore_types.cc @@@ -462,13 -442,15 +468,15 @@@ void bluestore_blob_t::encode(bufferlis small_encode_varint_lowz(compressed_length, bl); } if (has_csum()) { - small_encode_varint(csum_type, bl); - small_encode_varint(csum_chunk_order, bl); + ::encode(csum_type, bl); + ::encode(csum_chunk_order, bl); small_encode_buf_lowz(csum_data, bl); } - ::encode(ref_map, bl); + if (has_refmap()) { + ::encode(ref_map, bl); + } if (has_unused()) { - ::encode( unused_uint_t(unused.to_ullong()), bl); + ::encode(unused_uint_t(unused.to_ullong()), bl); } ENCODE_FINISH(bl); } @@@ -479,13 -461,14 +487,14 @@@ void bluestore_blob_t::decode(bufferlis small_decode(extents, p); small_decode_varint(flags, p); if (is_compressed()) { + small_decode_varint_lowz(compressed_length_orig, p); small_decode_varint_lowz(compressed_length, p); } else { - compressed_length = 0; + compressed_length_orig = compressed_length = 0; } if (has_csum()) { - small_decode_varint(csum_type, p); - small_decode_varint(csum_chunk_order, p); + ::decode(csum_type, p); + ::decode(csum_chunk_order, p); small_decode_buf_lowz(csum_data, p); } else { csum_type = CSUM_NONE;