From: chunmei-liu Date: Thu, 31 Mar 2022 22:14:14 +0000 (-0700) Subject: crimson: handle osd_op.op.flags include CEPH_OSD_OP_FLAG_FAILOK X-Git-Tag: v18.0.0~1139^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9aa3defc1fb88aee52a343d123acda3c535e5770;p=ceph.git crimson: handle osd_op.op.flags include CEPH_OSD_OP_FLAG_FAILOK If the osd_op failed, still continue to next op when it include CEPH_OSD_OP_FLAG_FAILOK. Signed-off-by: chunmei-liu --- diff --git a/src/crimson/common/errorator.h b/src/crimson/common/errorator.h index b4e617ce208d..f695bd82a614 100644 --- a/src/crimson/common/errorator.h +++ b/src/crimson/common/errorator.h @@ -1143,6 +1143,7 @@ namespace ct_error { using address_in_use = ct_error_code; using address_not_available = ct_error_code; using ecanceled = ct_error_code; + using einprogress = ct_error_code; struct pass_further_all { template diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 170d091299c4..81a7b50d2ce6 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -475,6 +475,19 @@ 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); +} + +OpsExecuter::interruptible_errorated_future +OpsExecuter::do_execute_op(OSDOp& osd_op) { // TODO: dispatch via call table? // TODO: we might want to find a way to unify both input and output diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index 8e4420bb86bb..659c682da3a6 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -228,6 +228,9 @@ private: return crimson::ct_error::operation_not_supported::make(); } + interruptible_errorated_future + do_execute_op(OSDOp& osd_op); + public: template OpsExecuter(Ref pg,