From d1f5ca7d8deb7e511c098b0b0f36c907b378cfa7 Mon Sep 17 00:00:00 2001 From: Gabriel BenHanokh Date: Tue, 19 Oct 2021 12:42:55 +0300 Subject: [PATCH] remove allocation file after rollback to real-fm Signed-off-by: Gabriel Benhanokh --- src/os/bluestore/BlueStore.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e7a8c2b68fd..9ac7ec68d44 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -18316,7 +18316,12 @@ int BlueStore::commit_to_real_manager() freelist_type = "bitmap"; int ret = commit_freelist_type(db, freelist_type, cct, path); if (ret == 0) { - + //remove the allocation_file + invalidate_allocation_file_on_bluefs(); + dout(5) << "Remove Allocation File" << dendl; + ret = bluefs->unlink(allocator_dir, allocator_file); + bluefs->sync_metadata(false); + dout(1) << "Remove Allocation File ret_code=" << ret << dendl; } return ret; } -- 2.47.3