From: chunmei-liu Date: Sat, 23 Apr 2022 08:59:31 +0000 (-0700) Subject: crimson/osd: still need set error code value in osd_op.rval X-Git-Tag: v18.0.0~997^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46012%2Fhead;p=ceph.git crimson/osd: still need set error code value in osd_op.rval Signed-off-by: chunmei-liu --- diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 81a7b50d2ce6..90ae9ea51471 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