]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
os/bluestore/BlueStore: Fix bug when calc offset & end whether locate in the a extent. 7892/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Thu, 3 Mar 2016 10:49:28 +0000 (18:49 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Thu, 3 Mar 2016 10:58:04 +0000 (18:58 +0800)
commitb0b4b6de362f0edfa51a1bf500a37020ace795ee
treed7f8aaf2b2adb2e3773491ee76f333c07d160fbf
parent045ad3d2a5bf85698d9d28e8e47bfe3ec2a136af
os/bluestore/BlueStore: Fix bug when calc offset & end whether locate in the a extent.

Suppose: bluestore_overlay_max_length == bluestore_min_alloc_size
The orignal code which calc content of written whether locate in a
extent:
(offset / min_alloc_size) == (offset + length) /min_alloc_size
This will make the case which offset=0 & length =min_alloc_size locate
in the different extent.
In fact, this content is in the same extent.

Change end = offset + length - 1 make work.

Fixes: #14954
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.cc