Skip to content

Commit b35da11

Browse files
committed
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 <[email protected]>
1 parent b399523 commit b35da11

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/crimson/os/seastore/cache.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,6 +1365,7 @@ record_t Cache::prepare_record(
13651365
// retiering extents, this is because logical linked tree
13661366
// nodes needs to access their prior instances in this
13671367
// phase if they are rewritten.
1368+
e->set_io_wait();
13681369
e->prepare_commit();
13691370
});
13701371

@@ -1796,6 +1797,7 @@ void Cache::complete_commit(
17961797
assert(!i->is_dirty());
17971798
const auto t_src = t.get_src();
17981799
touch_extent(*i, &t_src, t.get_cache_hint());
1800+
i->complete_io();
17991801
epm.commit_space_used(i->get_paddr(), i->get_length());
18001802

18011803
// Note: commit extents and backref allocations in the same place

src/crimson/os/seastore/cached_extent.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,12 +549,12 @@ class CachedExtent
549549
}
550550

551551
bool is_stable_writting() const {
552-
// MUTATION_PENDING and under-io extents are already stable and visible,
553-
// see prepare_record().
552+
// MUTATION_PENDING/INITIAL_WRITE_PENDING and under-io extents are already
553+
// stable and visible, see prepare_record().
554554
//
555-
// XXX: It might be good to mark this case as DIRTY from the definition,
555+
// XXX: It might be good to mark this case as DIRTY/CLEAN from the definition,
556556
// which probably can make things simpler.
557-
return is_mutation_pending() && is_pending_io();
557+
return (is_mutation_pending() || is_initial_pending()) && is_pending_io();
558558
}
559559

560560
/// Returns true if extent is stable and shared among transactions

0 commit comments

Comments
 (0)