]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix bluestore bitmap allocator calculated wrong last_pos with hint 38043/head
authorjhonxue <jhonxue@tencent.com>
Thu, 12 Nov 2020 15:17:13 +0000 (23:17 +0800)
committerjhonxue <jhonxue@tencent.com>
Thu, 12 Nov 2020 15:17:13 +0000 (23:17 +0800)
Fixes: https://tracker.ceph.com/issues/48214
Signed-off-by: Xue Yantao <jhonxue@tencent.com>
src/os/bluestore/fastbmap_allocator_impl.h

index ed2d4c8cc98ce4be65d864e1dc42474e5ea24c56..52a1edee2f8a60f040417110fef26f26bdb2f86c 100644 (file)
@@ -708,7 +708,7 @@ protected:
       return;
     }
     if (hint != 0) {
-      last_pos = (hint / d) < l2.size() ? p2align(hint, d) : 0;
+      last_pos = (hint / (d * l2_granularity)) < l2.size() ? p2align(hint / l2_granularity, d) : 0;
     }
     auto l2_pos = last_pos;
     auto last_pos0 = last_pos;