From: Gabriel BenHanokh Date: Tue, 19 Oct 2021 09:42:55 +0000 (+0300) Subject: remove allocation file after rollback to real-fm X-Git-Tag: v17.1.0~575^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1f5ca7d8deb7e511c098b0b0f36c907b378cfa7;p=ceph.git remove allocation file after rollback to real-fm Signed-off-by: Gabriel Benhanokh --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index e7a8c2b68fdc..9ac7ec68d444 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; }