From b7401f195902031d7c8aa3c66bd0c4d022212d55 Mon Sep 17 00:00:00 2001 From: chunmei-liu Date: Sat, 23 Apr 2022 01:59:31 -0700 Subject: [PATCH] crimson/osd: still need set error code value in osd_op.rval Signed-off-by: chunmei-liu --- src/crimson/osd/ops_executer.cc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 81a7b50d2ce62..90ae9ea514711 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -476,14 +476,17 @@ OpsExecuter::call_errorator::future<> OpsExecuter::do_assert_ver( OpsExecuter::interruptible_errorated_future OpsExecuter::execute_op(OSDOp& osd_op) { - return (osd_op.op.flags & CEPH_OSD_OP_FLAG_FAILOK) ? - do_execute_op(osd_op).handle_error_interruptible( - crimson::ct_error::eagain::pass_further{}, - crimson::ct_error::einprogress::pass_further{}, - osd_op_errorator::all_same_way([] { - return osd_op_errorator::now(); - })) - : do_execute_op(osd_op); + return do_execute_op(osd_op).handle_error_interruptible( + osd_op_errorator::all_same_way([&osd_op](auto e, auto&& e_raw) + -> OpsExecuter::osd_op_errorator::future<> { + osd_op.rval = -e.value(); + if ((osd_op.op.flags & CEPH_OSD_OP_FLAG_FAILOK) && + e.value() != EAGAIN && e.value() != EINPROGRESS) { + return osd_op_errorator::now(); + } else { + return std::move(e_raw); + } + })); } OpsExecuter::interruptible_errorated_future -- 2.39.5