]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore: drop backref when all backends are RBMs
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 13 May 2026 11:51:58 +0000 (19:51 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 31 Jul 2026 01:40:19 +0000 (09:40 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/async_cleaner.h
src/crimson/os/seastore/extent_placement_manager.h

index 59f0311a72b20968633cd35c4248ef0c6ca9efa0..1efc06b3c575b3c32eea9cfc15fbaa0bcef970af 100644 (file)
@@ -702,7 +702,7 @@ private:
   }
 
   bool can_drop_backref() const {
-    return get_backend_type() == backend_type_t::RANDOM_BLOCK;
+    return !tail_include_alloc;
   }
 
   bool should_trim_alloc() const {
index 11463df8fb33296e83a78c95aa617217fa0fdb02..8bd25d67219a076774811cb19a95239027c31e4c 100644 (file)
@@ -689,8 +689,9 @@ public:
 
   bool is_pure_rbm() const {
     return get_main_backend_type() == backend_type_t::RANDOM_BLOCK &&
-      // as of now, cold tier can only be segmented.
-      !background_process.has_cold_tier();
+      (!background_process.has_cold_tier() ||
+       (background_process.get_cold_tier_backend_type() ==
+        backend_type_t::RANDOM_BLOCK));
   }
 
   bool has_cold_tier() const {
@@ -945,6 +946,11 @@ private:
       return cold_cleaner.get() != nullptr;
     }
 
+    backend_type_t get_cold_tier_backend_type() const {
+      assert(cold_cleaner);
+      return cold_cleaner->get_backend_type();
+    }
+
     bool is_cold_device(device_id_t id) const {
       if (!has_cold_tier()) {
         return false;