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: v13.2.7~282^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=10e25a0f18dcb2f6a8abb2fe53571f8b169154a5;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) Conflicts: src/os/bluestore/fastbmap_allocator_impl.cc assert vs. ceph_assert mismatch --- diff --git a/src/os/bluestore/fastbmap_allocator_impl.cc b/src/os/bluestore/fastbmap_allocator_impl.cc index eda8f0b9ddf..ac5e7216571 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) { assert(ctx.affordable_len >= length); 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);