From: Xuehan Xu Date: Mon, 24 Mar 2025 03:35:02 +0000 (+0800) Subject: crimson/os/seastore/cache: initial_pending extents also do X-Git-Tag: testing/wip-pdonnell-testing-20250604.171440-debug~9^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b35da11bd414b8c7aa7ba3c4269bce4c7766da24;p=ceph-ci.git crimson/os/seastore/cache: initial_pending extents also do set_io_wait/complete_io/wait_io Fixes: https://tracker.ceph.com/issues/70976 Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/os/seastore/cache.cc b/src/crimson/os/seastore/cache.cc index cf83fa93042..472c1d57dc3 100644 --- a/src/crimson/os/seastore/cache.cc +++ b/src/crimson/os/seastore/cache.cc @@ -1365,6 +1365,7 @@ record_t Cache::prepare_record( // retiering extents, this is because logical linked tree // nodes needs to access their prior instances in this // phase if they are rewritten. + e->set_io_wait(); e->prepare_commit(); }); @@ -1796,6 +1797,7 @@ void Cache::complete_commit( assert(!i->is_dirty()); const auto t_src = t.get_src(); touch_extent(*i, &t_src, t.get_cache_hint()); + i->complete_io(); epm.commit_space_used(i->get_paddr(), i->get_length()); // Note: commit extents and backref allocations in the same place diff --git a/src/crimson/os/seastore/cached_extent.h b/src/crimson/os/seastore/cached_extent.h index dd34c8fbdab..6f8b73bb2ad 100644 --- a/src/crimson/os/seastore/cached_extent.h +++ b/src/crimson/os/seastore/cached_extent.h @@ -549,12 +549,12 @@ public: } bool is_stable_writting() const { - // MUTATION_PENDING and under-io extents are already stable and visible, - // see prepare_record(). + // MUTATION_PENDING/INITIAL_WRITE_PENDING and under-io extents are already + // stable and visible, see prepare_record(). // - // XXX: It might be good to mark this case as DIRTY from the definition, + // XXX: It might be good to mark this case as DIRTY/CLEAN from the definition, // which probably can make things simpler. - return is_mutation_pending() && is_pending_io(); + return (is_mutation_pending() || is_initial_pending()) && is_pending_io(); } /// Returns true if extent is stable and shared among transactions