From 1152a86e6f587a740f7207667a8efac96f1b500a Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Thu, 9 Oct 2025 22:48:12 +0000 Subject: [PATCH] crimson/.../btree_lba_manager: convert alloc_extent to coroutine Signed-off-by: Samuel Just --- src/crimson/os/seastore/lba/btree_lba_manager.h | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/crimson/os/seastore/lba/btree_lba_manager.h b/src/crimson/os/seastore/lba/btree_lba_manager.h index 6cbd1bea525..4819b24f444 100644 --- a/src/crimson/os/seastore/lba/btree_lba_manager.h +++ b/src/crimson/os/seastore/lba/btree_lba_manager.h @@ -148,16 +148,11 @@ public: refcount, ext.get_last_committed_crc(), ext)}; - return seastar::do_with( - std::move(alloc_infos), - [this, &t, hint](auto &alloc_infos) { - return alloc_contiguous_mappings( - t, hint, alloc_infos, alloc_policy_t::linear_search - ).si_then([](auto cursors) { - assert(cursors.size() == 1); - return LBAMapping::create_direct(std::move(cursors.front())); - }); - }); + auto cursors = co_await alloc_contiguous_mappings( + t, hint, alloc_infos, alloc_policy_t::linear_search + ); + assert(cursors.size() == 1); + co_return LBAMapping::create_direct(std::move(cursors.front())); } alloc_extents_ret alloc_extents( -- 2.47.3