Skip to content

Commit

Permalink
crimson/os/seastore/cached_extent: add comments to elaborate why
Browse files Browse the repository at this point in the history
MUTATION_PENDING and under-io extents are "stable"

Signed-off-by: Xuehan Xu <[email protected]>
  • Loading branch information
xxhdx1985126 committed Mar 18, 2024
1 parent 7aa972d commit b1c59ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/crimson/os/seastore/cached_extent.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ class CachedExtent
/// Returns true if extent is stable and shared among transactions
bool is_stable() const {
return is_stable_written() ||
// MUTATION_PENDING and under-io extents are to-be-stable extents,
// for the sake of caveats that checks the correctness of extents
// states, we consider them stable.
(is_mutation_pending() &&
is_pending_io());
}
Expand Down

0 comments on commit b1c59ca

Please sign in to comment.