]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix duplicate allocations in bmap allocator
authorIgor Fedotov <ifedotov@suse.com>
Tue, 11 Jun 2019 17:05:09 +0000 (20:05 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 19 Jun 2019 08:53:38 +0000 (11:53 +0300)
Fixes: http://tracker.ceph.com/issues/40080
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit eac81bc85970287fce60178e80c37628b3df0e7d)

src/os/bluestore/fastbmap_allocator_impl.cc

index 1dd491d11f927116637e1e624bf050b8f0148f04..089ff396ad7b0ca75297eb813cd2712a3378db61 100755 (executable)
@@ -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);