]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: set result = 0 when op.flags include CEPH_OSD_OP_FLAG_FAILOK 45719/head
authorChunmei Liu <chunmei.liu@intel.com>
Wed, 30 Mar 2022 00:26:15 +0000 (17:26 -0700)
committerchunmei-liu <chunmei.liu@intel.com>
Thu, 31 Mar 2022 23:06:34 +0000 (16:06 -0700)
Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
src/crimson/osd/pg.cc

index 1efb388b39379b24cc0b121d21ee5611913f3500..dadbc8dd54a5e7c581c62f12710155caefef2971 100644 (file)
@@ -766,7 +766,10 @@ PG::do_osd_ops(
           }
         }
       } else if (result > 0 && may_write && !rvec) {
-          result = 0;
+        result = 0;
+      } else if (result < 0 && (m->ops.empty() ?
+        0 : m->ops.back().op.flags & CEPH_OSD_OP_FLAG_FAILOK)) {
+        result = 0;
       }
       auto reply = crimson::make_message<MOSDOpReply>(m.get(),
                                              result,
@@ -791,6 +794,10 @@ PG::do_osd_ops(
     [m, this] (const std::error_code& e) {
       auto reply = crimson::make_message<MOSDOpReply>(
         m.get(), -e.value(), get_osdmap_epoch(), 0, false);
+      if (m->ops.empty() ? 0 :
+        m->ops.back().op.flags & CEPH_OSD_OP_FLAG_FAILOK) {
+        reply->set_result(0);
+      }
       reply->set_enoent_reply_versions(
         peering_state.get_info().last_update,
         peering_state.get_info().last_user_version);