BlueStore::read_allocation_from_drive_for_bluestore_tool was
not informed that multiple bdev labels can exist and reserve space.
Comparison of real alloc vs recovered alloc was failing.
Fixes: https://tracker.ceph.com/issues/68560
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit
358f33a148c9a65478e33648f16e8c8af73c98f2)
if (ret < 0) {
return ret;
}
+ if (bdev_label_multi) {
+ uint64_t lsize = std::max(BDEV_LABEL_BLOCK_SIZE, min_alloc_size);
+ for (uint64_t p : bdev_label_valid_locations) {
+ if (p != BDEV_FIRST_LABEL_POSITION) {
+ allocator->init_rm_free(p, lsize);
+ }
+ }
+ }
duration = ceph_clock_now() - start;
stats.insert_count = 0;