Merge pull request #38043 from jhonxue/wip-fix-bluestore-bitmap-allocator

osd: fix bluestore bitmap allocator calculate wrong last_pos with hint

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
This commit is contained in:
Kefu Chai 2020-11-16 00:38:35 +08:00 committed by GitHub
commit 3c58e34f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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;