]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix free space update after bdev-expand in NCB mode. 55776/head
authorIgor Fedotov <igor.fedotov@croit.io>
Fri, 22 Dec 2023 21:05:37 +0000 (00:05 +0300)
committerIgor Fedotov <igor.fedotov@croit.io>
Tue, 27 Feb 2024 09:42:04 +0000 (12:42 +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>
(cherry picked from commit f3061c41e420de9d626442079b2affc57da64b5a)

src/os/bluestore/BlueStore.cc

index f21ea5f2e79f311c550e4957d3be6f5b641cbe31..89c1d1b2419e253d62ec61fc5b64b75372eace55 100644 (file)
@@ -7639,17 +7639,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();