]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix bluestore bitmap allocator calculated wrong last_pos with hint 39708/head
authorjhonxue <jhonxue@tencent.com>
Thu, 12 Nov 2020 15:17:13 +0000 (23:17 +0800)
committerNathan Cutler <ncutler@suse.com>
Thu, 25 Feb 2021 20:52:25 +0000 (21:52 +0100)
Fixes: https://tracker.ceph.com/issues/48214
Signed-off-by: Xue Yantao <jhonxue@tencent.com>
(cherry picked from commit ad3c7cdf6fabbb4a8b542b793d632cae87ee3640)

src/os/bluestore/fastbmap_allocator_impl.h

index ed2d4c8cc98ce4be65d864e1dc42474e5ea24c56..52a1edee2f8a60f040417110fef26f26bdb2f86c 100755 (executable)
@@ -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;