crimson/os/seastore: drop backref when all backends are RBMs

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
This commit is contained in:
Xuehan Xu 2026-05-13 19:51:58 +08:00
parent c8769a0f34
commit e4979f98ed
2 changed files with 9 additions and 3 deletions

View 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 {

View 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;