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: v19.3.0~198^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f3061c41e420de9d626442079b2affc57da64b5a;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 --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7b89f0e46fdc..b154e0b52213 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();