From 45fe47356cdc572b8776963d83f95c625e11e251 Mon Sep 17 00:00:00 2001 From: Gabriel BenHanokh Date: Thu, 17 Mar 2022 22:26:58 +0200 Subject: [PATCH] Bug-Fix from PR-44370 force setting need_to_destage_allocation_file to True on device expansion without checking if we work in null-fm mode Signed-off-by: Gabriel Benhanokh (cherry picked from commit f7ebef8a804b8ce193bcbee4284dc28102708f37) --- src/os/bluestore/BlueStore.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 92c9907608103..ce066fa72952b 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -7531,10 +7531,11 @@ int BlueStore::expand_devices(ostream& out) } } - // 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; - + 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 -- 2.39.5