]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: handle osd_op.op.flags include CEPH_OSD_OP_FLAG_FAILOK
authorchunmei-liu <chunmei.liu@intel.com>
Thu, 31 Mar 2022 22:14:14 +0000 (15:14 -0700)
committerchunmei-liu <chunmei.liu@intel.com>
Thu, 31 Mar 2022 23:06:22 +0000 (16:06 -0700)
If the osd_op failed, still continue to next op when it include
CEPH_OSD_OP_FLAG_FAILOK.

Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
src/crimson/common/errorator.h
src/crimson/osd/ops_executer.cc
src/crimson/osd/ops_executer.h

index b4e617ce208d7a62f308c8c24998c5338cdfff01..f695bd82a6148cccac621a4e1d6138438741a263 100644 (file)
@@ -1143,6 +1143,7 @@ namespace ct_error {
   using address_in_use = ct_error_code<std::errc::address_in_use>;
   using address_not_available = ct_error_code<std::errc::address_not_available>;
   using ecanceled = ct_error_code<std::errc::operation_canceled>;
+  using einprogress = ct_error_code<std::errc::operation_in_progress>;
 
   struct pass_further_all {
     template <class ErrorT>
index 170d091299c4a85ee9112cd7f0a44fddc27ad022..81a7b50d2ce62d5faff9ec1dd2027caedd04f73c 100644 (file)
@@ -475,6 +475,19 @@ 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);
+}
+
+OpsExecuter::interruptible_errorated_future<OpsExecuter::osd_op_errorator>
+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
index 8e4420bb86bb7a0bf01bc3013d9d548942a40320..659c682da3a65946ac53b6e6e1d8bfc9b7cd8484 100644 (file)
@@ -228,6 +228,9 @@ private:
     return crimson::ct_error::operation_not_supported::make();
   }
 
+  interruptible_errorated_future<osd_op_errorator>
+  do_execute_op(OSDOp& osd_op);
+
 public:
   template <class MsgT>
   OpsExecuter(Ref<PG> pg,