From: Samuel Just Date: Tue, 26 Aug 2025 20:20:01 +0000 (-0700) Subject: crimson/.../circular_bounded_journal: convert submit_record to coroutine X-Git-Tag: v21.0.0~157^2~172^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ea06e530e7411efef5ae9caf64b1722df0d7bbe7;p=ceph.git crimson/.../circular_bounded_journal: convert submit_record to coroutine Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/seastore/journal/circular_bounded_journal.cc b/src/crimson/os/seastore/journal/circular_bounded_journal.cc index 41ff8318aba0..b30699f95c4b 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<>