From: Igor Fedotov Date: Fri, 22 Dec 2023 21:05:37 +0000 (+0300) Subject: os/bluestore: fix free space update after bdev-expand in NCB mode. X-Git-Tag: v17.2.8~177^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55776%2Fhead;p=ceph.git os/bluestore: fix free space update after bdev-expand in NCB mode. Initially this was omitted due to read-only mode. Fixes: https://tracker.ceph.com/issues/63858 Signed-off-by: Igor Fedotov (cherry picked from commit f3061c41e420de9d626442079b2affc57da64b5a) --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index f21ea5f2e79..89c1d1b2419 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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();