From: Igor Fedotov Date: Tue, 21 Apr 2026 12:21:07 +0000 (+0300) Subject: os/bluestore: do not add expanded space to allocator after allocmap X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d6e021d76b895d8fd924ca3cd1b3db65548484f9;p=ceph.git os/bluestore: do not add expanded space to allocator after allocmap recovery. The recovery procedure performs that itself by design. Fixes: https://tracker.ceph.com/issues/75852 Signed-off-by: Igor Fedotov --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index a5aa845fdec..5081bbc11a3 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -7534,6 +7534,13 @@ int BlueStore::_init_alloc() } if (restore_allocator(alloc, &num, &bytes) == 0) { dout(5) << __func__ << "::NCB::restore_allocator() completed successfully alloc=" << alloc << dendl; + if (before_expansion_bdev_size > 0 && + before_expansion_bdev_size < bdev_label.size) { + // we grow the allocation range, must reflect it in the allocation file + alloc->init_add_free(before_expansion_bdev_size, + bdev_label.size - before_expansion_bdev_size); + need_to_destage_allocation_file = true; + } } else { // This must mean that we had an unplanned shutdown and didn't manage to destage the allocator dout(0) << __func__ << "::NCB::restore_allocator() failed! Run Full Recovery from ONodes (might take a while) ..." << dendl; @@ -7545,13 +7552,6 @@ int BlueStore::_init_alloc() return -ENOTRECOVERABLE; } } - if (before_expansion_bdev_size > 0 && - before_expansion_bdev_size < bdev_label.size) { - // we grow the allocation range, must reflect it in the allocation file - alloc->init_add_free(before_expansion_bdev_size, - bdev_label.size - before_expansion_bdev_size); - need_to_destage_allocation_file = true; - } } before_expansion_bdev_size = 0;