]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #9988 from ifed01/wip-bluestore-reduce-blob4
authorMark Nelson <mark.a.nelson@gmail.com>
Thu, 28 Jul 2016 14:53:01 +0000 (09:53 -0500)
committerGitHub <noreply@github.com>
Thu, 28 Jul 2016 14:53:01 +0000 (09:53 -0500)
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 <mnelson@redhat.com>
1  2 
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h
src/os/bluestore/bluestore_types.cc
src/os/bluestore/bluestore_types.h

Simple merge
Simple merge
index e7d963481923c745c48397aa2e6614a36d33976a,41aa3ec9380e17d608ec788c93db43409d9ed706..dfec95a1fcf98a09f167ea270cc71d4700341400
@@@ -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;
Simple merge