]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
remove allocation file after rollback to real-fm
authorGabriel BenHanokh <benhanokh@gmail.com>
Tue, 19 Oct 2021 09:42:55 +0000 (12:42 +0300)
committerGabriel BenHanokh <benhanokh@gmail.com>
Tue, 19 Oct 2021 09:48:14 +0000 (12:48 +0300)
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
src/os/bluestore/BlueStore.cc

index e7a8c2b68fdc62cd6c7682a539317b415726a49f..9ac7ec68d444958897225d9daec262e6c9d402e1 100644 (file)
@@ -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;
 }