]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: fix free space update after bdev-expand in NCB mode.
authorIgor Fedotov <igor.fedotov@croit.io>
Fri, 22 Dec 2023 21:05:37 +0000 (00:05 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Fri, 22 Dec 2023 21:05:37 +0000 (00:05 +0300)
Initially this was omitted due to read-only mode.

Fixes: https://tracker.ceph.com/issues/63858
Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
src/os/bluestore/BlueStore.cc

index 7b89f0e46fdcc63f3f85c9a5931c61a6712d4e85..b154e0b52213bdff62d48021a2648e8ddec64705 100644 (file)
@@ -8772,17 +8772,16 @@ int BlueStore::expand_devices(ostream& out)
           << std::endl;
       }
     }
+    _close_db_and_around();
 
+    // mount in read/write to sync expansion changes
+    r = _mount();
+    ceph_assert(r == 0);
     if (fm && fm->is_null_manager()) {
       // we grow the allocation range, must reflect it in the allocation file
       alloc->init_add_free(size0, size - size0);
       need_to_destage_allocation_file = true;
     }
-    _close_db_and_around();
-
-    // mount in read/write to sync expansion changes
-    r = _mount();
-    ceph_assert(r == 0);
     umount();
   } else {
     _close_db_and_around();