From f3061c41e420de9d626442079b2affc57da64b5a Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Sat, 23 Dec 2023 00:05:37 +0300 Subject: [PATCH] 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 --- src/os/bluestore/BlueStore.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7b89f0e46fd..b154e0b5221 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -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(); -- 2.39.5