From: Igor Fedotov Date: Tue, 11 Jun 2019 17:05:09 +0000 (+0300) Subject: os/bluestore: fix duplicate allocations in bmap allocator X-Git-Tag: v14.2.2~2^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=501eef729444887be1d4f66e03bb36cc378fad53;p=ceph.git os/bluestore: fix duplicate allocations in bmap allocator Fixes: http://tracker.ceph.com/issues/40080 Signed-off-by: Igor Fedotov (cherry picked from commit eac81bc85970287fce60178e80c37628b3df0e7d) --- diff --git a/src/os/bluestore/fastbmap_allocator_impl.cc b/src/os/bluestore/fastbmap_allocator_impl.cc index 1dd491d11f92..089ff396ad7b 100755 --- a/src/os/bluestore/fastbmap_allocator_impl.cc +++ b/src/os/bluestore/fastbmap_allocator_impl.cc @@ -365,7 +365,7 @@ interval_t AllocatorLevel01Loose::_allocate_l1_contiguous(uint64_t length, if (ctx.affordable_len) { ceph_assert(ctx.affordable_len >= length); ceph_assert((length % l0_granularity) == 0); - auto pos_start = ctx.affordable_offs + length / l0_granularity; + auto pos_start = ctx.affordable_offs / l0_granularity; auto pos_end = (ctx.affordable_offs + length) / l0_granularity; _mark_alloc_l1_l0(pos_start, pos_end); res = interval_t(ctx.affordable_offs, length);