From: Xuehan Xu Date: Wed, 8 Jul 2026 07:15:27 +0000 (+0800) Subject: crimson/os/seastore/transaction: drop the old trans-blocking mechinary X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2b1ed9e100a4f5ff76b9eef5380100942c4c45f6;p=ceph.git crimson/os/seastore/transaction: drop the old trans-blocking mechinary This old trans-blocking mechinary can be hard to maintain in the future Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/os/seastore/cache.cc b/src/crimson/os/seastore/cache.cc index 9500ffdbc61..bcc2adef7d1 100644 --- a/src/crimson/os/seastore/cache.cc +++ b/src/crimson/os/seastore/cache.cc @@ -1394,7 +1394,6 @@ record_t Cache::prepare_record( } if (should_use_no_conflict_publish(t, i->get_type())) { i->new_committer(t); - i->committer->block_trans(t); } assert(i->is_exist_mutation_pending() || i->prior_instance); @@ -1675,8 +1674,6 @@ record_t Cache::prepare_record( assert(!i->get_prior_instance()->committer); i->new_committer(t); assert(i->committer); - auto &committer = *i->committer; - committer.block_trans(t); i->get_prior_instance()->set_io_wait( CachedExtent::extent_state_t::CLEAN, should_use_no_conflict_publish(t, i->get_type())); @@ -1711,8 +1708,6 @@ record_t Cache::prepare_record( i->new_committer(t); assert(i->committer); i->get_prior_instance()->committer = i->committer; - auto &committer = *i->committer; - committer.block_trans(t); i->get_prior_instance()->set_io_wait( CachedExtent::extent_state_t::CLEAN, true); } @@ -2050,7 +2045,6 @@ void Cache::complete_commit( } touch_extent_fully(prior, &t_src, t.get_cache_hint()); committer.sync_version(); - committer.unblock_trans(t); prior.complete_io(); i->committer.reset(); prior.committer.reset(); @@ -2131,7 +2125,6 @@ void Cache::complete_commit( auto &committer = *i->committer; committer.commit_state(); committer.sync_checksum(); - committer.unblock_trans(t); auto &prior = *i->prior_instance; prior.pending_for_transaction = TRANS_ID_NULL; ceph_assert(prior.is_valid()); diff --git a/src/crimson/os/seastore/cached_extent.cc b/src/crimson/os/seastore/cached_extent.cc index 391ca6c454f..09caf5f6635 100644 --- a/src/crimson/os/seastore/cached_extent.cc +++ b/src/crimson/os/seastore/cached_extent.cc @@ -515,24 +515,4 @@ void CachedExtent::new_committer(Transaction &t) { prior_instance->committer = committer; } -void ExtentCommitter::block_trans(Transaction &t) { - LOG_PREFIX(ExtentCommitter::block_trans); - auto &prior = *extent.prior_instance; - for (auto &item : prior.read_transactions) { - TRACET("blocking trans {} for rewriting {}", - t, item.t->get_trans_id(), *item.ref); - item.t->need_wait_visibility = true; - } -} - -void ExtentCommitter::unblock_trans(Transaction &t) { - LOG_PREFIX(ExtentCommitter::unblock_trans); - auto &prior = *extent.prior_instance; - for (auto &item : prior.read_transactions) { - TRACET("unblocking trans {} for rewriting {}", - t, item.t->get_trans_id(), *item.ref); - item.t->need_wait_visibility = false; - } -} - } diff --git a/src/crimson/os/seastore/cached_extent.h b/src/crimson/os/seastore/cached_extent.h index 098fb1358df..e0325c6bf60 100644 --- a/src/crimson/os/seastore/cached_extent.h +++ b/src/crimson/os/seastore/cached_extent.h @@ -279,8 +279,6 @@ public: ExtentCommitter(CachedExtent &extent, Transaction &t) : extent(extent), t(t) {} - void block_trans(Transaction &); - void unblock_trans(Transaction &); // commit all extent states to the prior instance, // except poffset and extent content void commit_state(); diff --git a/src/crimson/os/seastore/transaction.h b/src/crimson/os/seastore/transaction.h index e88c2e73830..99caa62dd80 100644 --- a/src/crimson/os/seastore/transaction.h +++ b/src/crimson/os/seastore/transaction.h @@ -547,7 +547,6 @@ public: ool_write_stats = {}; rewrite_stats = {}; conflicted = false; - need_wait_visibility = false; force_rewrite_conflict = false; assert(backref_entries.empty()); if (!has_reset) { @@ -675,7 +674,6 @@ public: btree_cursor_stats_t cursor_stats; - bool need_wait_visibility = false; bool force_rewrite_conflict = false; using update_copied_lba_key_func_t = diff --git a/src/crimson/os/seastore/transaction_manager.cc b/src/crimson/os/seastore/transaction_manager.cc index 10244545a2f..ae2b32cfd0d 100644 --- a/src/crimson/os/seastore/transaction_manager.cc +++ b/src/crimson/os/seastore/transaction_manager.cc @@ -634,9 +634,6 @@ TransactionManager::do_submit_transaction( tref.get_phase_durations().prepare_enter += std::chrono::steady_clock::now() - prepare_enter_start; - while (tref.need_wait_visibility) { - co_await trans_intr::make_interruptible(seastar::yield()); - } if (trim_alloc_to && *trim_alloc_to != JOURNAL_SEQ_NULL) { SUBTRACET(seastore_t, "trim backref_bufs to {}", tref, *trim_alloc_to); cache->trim_backref_bufs(*trim_alloc_to);