mirror of
https://github.com/ceph/ceph
synced 2024-12-26 05:25:09 +00:00
crimson/os/seastore/cache: consider EXIST_CLEAN extents as pending ones
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
This commit is contained in:
parent
b5d6ca7a8f
commit
f34faf363e
@ -999,7 +999,7 @@ CachedExtentRef Cache::duplicate_for_write(
|
||||
Transaction &t,
|
||||
CachedExtentRef i) {
|
||||
LOG_PREFIX(Cache::duplicate_for_write);
|
||||
if (i->is_pending())
|
||||
if (i->is_mutable())
|
||||
return i;
|
||||
|
||||
if (i->is_exist_clean()) {
|
||||
|
@ -280,13 +280,17 @@ public:
|
||||
return TCachedExtentRef<const T>(static_cast<const T*>(this));
|
||||
}
|
||||
|
||||
/// Returns true if extent is part of an open transaction
|
||||
bool is_pending() const {
|
||||
bool is_mutable() const {
|
||||
return state == extent_state_t::INITIAL_WRITE_PENDING ||
|
||||
state == extent_state_t::MUTATION_PENDING ||
|
||||
state == extent_state_t::EXIST_MUTATION_PENDING;
|
||||
}
|
||||
|
||||
/// Returns true if extent is part of an open transaction
|
||||
bool is_pending() const {
|
||||
return is_mutable() || state == extent_state_t::EXIST_CLEAN;
|
||||
}
|
||||
|
||||
/// Returns true if extent has a pending delta
|
||||
bool is_mutation_pending() const {
|
||||
return state == extent_state_t::MUTATION_PENDING;
|
||||
|
Loading…
Reference in New Issue
Block a user