]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
bug-fix close db when umount failed to store allocation file
authorGabriel BenHanokh <benhanokh@gmail.com>
Mon, 18 Oct 2021 17:19:24 +0000 (20:19 +0300)
committerGabriel BenHanokh <benhanokh@gmail.com>
Tue, 19 Oct 2021 09:48:12 +0000 (12:48 +0300)
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
src/os/bluestore/BlueStore.cc

index edd563ced55b49316d4b11134085f51d364cd115..e7a8c2b68fdc62cd6c7682a539317b415726a49f 100644 (file)
@@ -7280,6 +7280,8 @@ int BlueStore::umount()
     int ret = store_allocator(shared_alloc.a);
     if (ret != 0) {
       derr << __func__ << "::NCB::store_allocator() failed (continue with bitmapFreelistManager)" << dendl;
+      _close_db_and_around(false);
+      // should we run fsck ???
       return ret;
     }
     dout(5) << __func__ << "::NCB::store_allocator() completed successfully" << dendl;
@@ -18312,7 +18314,11 @@ int BlueStore::commit_to_real_manager()
   dout(5) << "Set FreelistManager to Real FM..." << dendl;
   ceph_assert(!fm->is_null_manager());
   freelist_type = "bitmap";
-  return commit_freelist_type(db, freelist_type, cct, path);
+  int ret = commit_freelist_type(db, freelist_type, cct, path);
+  if (ret == 0) {
+
+  }
+  return ret;
 }
 
 //================================================================================================================