]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: do not add expanded space to allocator after allocmap
authorIgor Fedotov <igor.fedotov@croit.io>
Tue, 21 Apr 2026 12:21:07 +0000 (15:21 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 30 Jun 2026 12:42:41 +0000 (15:42 +0300)
recovery.

The recovery procedure performs that itself by design.
Fixes: https://tracker.ceph.com/issues/75852
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueStore.cc

index a5aa845fdec46cda25f350af84a4a7c9e6a6a296..5081bbc11a387f9ac33959feae8adf5faca4486d 100644 (file)
@@ -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;