From ea06e530e7411efef5ae9caf64b1722df0d7bbe7 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 26 Aug 2025 13:20:01 -0700 Subject: [PATCH] crimson/.../circular_bounded_journal: convert submit_record to coroutine Signed-off-by: Samuel Just --- .../journal/circular_bounded_journal.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/crimson/os/seastore/journal/circular_bounded_journal.cc b/src/crimson/os/seastore/journal/circular_bounded_journal.cc index 41ff8318aba..b30699f95c4 100644 --- a/src/crimson/os/seastore/journal/circular_bounded_journal.cc +++ b/src/crimson/os/seastore/journal/circular_bounded_journal.cc @@ -68,17 +68,14 @@ CircularBoundedJournal::submit_record( LOG_PREFIX(CircularBoundedJournal::submit_record); DEBUG("H{} {} start ...", (void*)&handle, record); assert(write_pipeline); - return do_submit_record( + co_await do_submit_record( std::move(record), handle, std::move(on_submission) - ).safe_then([this, t_src] { - if (is_trim_transaction(t_src)) { - return update_journal_tail( - trimmer.get_dirty_tail(), - trimmer.get_alloc_tail()); - } else { - return seastar::now(); - } - }); + ); + if (is_trim_transaction(t_src)) { + co_await update_journal_tail( + trimmer.get_dirty_tail(), + trimmer.get_alloc_tail()); + } } CircularBoundedJournal::submit_record_ertr::future<> -- 2.39.5