]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.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>
Tue, 7 Jul 2026 08:15:31 +0000 (16:15 +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 8e62babcff25d9c13b0514bb8daa9352ef3ca22c..9cc588a44bb8f3c002471bb4225574692f4fd0e0 100644 (file)
@@ -669,8 +669,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 {
@@ -923,6 +924,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;