crimson/osd: still need set error code value in osd_op.rval

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
This commit is contained in:
chunmei-liu 2022-04-23 01:59:31 -07:00
parent 636bba68ff
commit b7401f1959

View File

@ -476,14 +476,17 @@ OpsExecuter::call_errorator::future<> OpsExecuter::do_assert_ver(
OpsExecuter::interruptible_errorated_future<OpsExecuter::osd_op_errorator>
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<OpsExecuter::osd_op_errorator>