]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore: fix potential access past eof during debugging prefill
authorxie xingguo <xie.xingguo@zte.com.cn>
Tue, 5 Jul 2016 03:04:31 +0000 (11:04 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Tue, 5 Jul 2016 03:10:32 +0000 (11:10 +0800)
commitc48c19957c07428e66e3fa0f5be66822d4f7fcdd
tree8b75f57edd3e0e71e40205882ceec0b021cc5449
parentb5a40d09e5894ad54df23238c7f242f5da32cf85
os/bluestore: fix potential access past eof during debugging prefill

1. pre-calculate r, so we don't have to do the division each loop, which
   is expensive.

2. make sure the extent to be allocated is within the block device size.

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