]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix potential uninitialized nid of onode
authorxie xingguo <xie.xingguo@zte.com.cn>
Mon, 11 Jul 2016 02:59:27 +0000 (10:59 +0800)
committerMark Nelson <mnelson@redhat.com>
Mon, 18 Jul 2016 15:45:23 +0000 (10:45 -0500)
commit7f564d9e2cc3b19e661bffe278516e7ab64d23b0
tree099d075e82004092428bbb688e46c3926ff1c3bf
parent61769636ff90b7ffe8df7e5984a694b8c6c4d616
os/bluestore: fix potential uninitialized nid of onode

The _zero() process may implicitly create a new onode,
thus we shall call _assign_nid() to initialize the nid
properly. And if the onode already has one, _assign_nid()
does nothing.

So it is proper to call _assign_nid() here under any case.

Mark's comments:

This passed "ceph_test_objectstore --gtest_filter=*/2".
This PR did not appear to have a significant impact on performance tests.

Closes #10236

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
os/bluestore: check against we don't overflow

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
os/bluestore: try to reap as many collections as we can

So if there is one collection getting contiguously stucking,
we don't abort at the same point each time.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
os/bluestore: make device size of BitFreelistManager is block-size aligned

Otherwise if we try to set past-eof blocks as allocated durint create(),
the call to _xor() will trigger the firing of the following assert:

   assert((length & block_mask) == length);

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BitmapFreelistManager.cc
src/os/bluestore/BlueStore.cc