]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/os/bluestore/FreelistManager.cc
import ceph quincy 17.2.6
[ceph.git] / ceph / src / os / bluestore / FreelistManager.cc
index 5907df443e00b9a7134f6a569a7d86c3a2aa1413..69866fa40cb5f493a4b365eb027c404e9738ebb6 100644 (file)
@@ -17,8 +17,15 @@ FreelistManager *FreelistManager::create(
   // op is per prefix, has to done pre-db-open, and we don't know the
   // freelist type until after we open the db.
   ceph_assert(prefix == "B");
-  if (type == "bitmap")
+  if (type == "bitmap") {
     return new BitmapFreelistManager(cct, "B", "b");
+  }
+  if (type == "null") {
+    // use BitmapFreelistManager with the null option to stop allocations from going to RocksDB
+    auto *fm = new BitmapFreelistManager(cct, "B", "b");
+    fm->set_null_manager();
+    return fm;
+  }
 
 #ifdef HAVE_LIBZBD
   // With zoned drives there is only one FreelistManager implementation that we