From b1c59ca077597e14a053d47d4961b12ba7a2a1b0 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Mon, 18 Mar 2024 17:24:02 +0800 Subject: [PATCH] crimson/os/seastore/cached_extent: add comments to elaborate why MUTATION_PENDING and under-io extents are "stable" Signed-off-by: Xuehan Xu --- src/crimson/os/seastore/cached_extent.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/crimson/os/seastore/cached_extent.h b/src/crimson/os/seastore/cached_extent.h index 18ddbd95796c3..730a0ace9a0b7 100644 --- a/src/crimson/os/seastore/cached_extent.h +++ b/src/crimson/os/seastore/cached_extent.h @@ -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()); }