mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
crimson/os/seastore: drop backref when all backends are RBMs
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
This commit is contained in:
parent
c8769a0f34
commit
e4979f98ed
@ -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 {
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user