Skip to content

Commit 28f4413

Browse files
committed
crimson/osd/osd_operations/snaptrim_event: make use of process_and_submit
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
1 parent 38bd4e7 commit 28f4413

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

src/crimson/osd/osd_operations/snaptrim_event.cc

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -402,30 +402,8 @@ SnapTrimObjSubEvent::start()
402402
// lock both clone's and head's obcs
403403
co_await pg->obc_loader.with_obc<RWState::RWWRITE>(
404404
coid,
405-
[this](auto head_obc, auto clone_obc) -> ObjectContextLoader::load_obc_iertr::future<> {
406-
logger().debug("{}: got clone_obc={}", *this, clone_obc->get_oid());
407-
408-
co_await enter_stage<interruptor>(client_pp().process);
409-
410-
logger().debug("{}: processing clone_obc={}", *this, clone_obc->get_oid());
411-
412-
auto txn = co_await remove_or_update(clone_obc, head_obc);
413-
414-
auto [submitted, all_completed] = co_await pg->submit_transaction(
415-
std::move(clone_obc),
416-
std::move(txn),
417-
std::move(osd_op_p),
418-
std::move(log_entries)
419-
);
420-
421-
co_await std::move(submitted);
422-
423-
co_await enter_stage<interruptor>(client_pp().wait_repop);
424-
425-
co_await std::move(all_completed);
426-
427-
co_return;
428-
},
405+
std::bind(&SnapTrimObjSubEvent::process_and_submit,
406+
this, std::placeholders::_1, std::placeholders::_2),
429407
false
430408
).handle_error_interruptible(
431409
remove_or_update_iertr::pass_further{},

0 commit comments

Comments
 (0)