summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/pg.cc
diff options
context:
space:
mode:
authorChunmei Liu <chunmei.liu@intel.com>2022-03-30 02:26:15 +0200
committerchunmei-liu <chunmei.liu@intel.com>2022-04-01 01:06:34 +0200
commit31b6340b8707934be8d6a6c87a4abd9b529af0bc (patch)
tree9fd2bd5a1bb2a622b1c02a4b94a3e424a5c0023e /src/crimson/osd/pg.cc
parentcrimson: handle osd_op.op.flags include CEPH_OSD_OP_FLAG_FAILOK (diff)
downloadceph-31b6340b8707934be8d6a6c87a4abd9b529af0bc.tar.xz
ceph-31b6340b8707934be8d6a6c87a4abd9b529af0bc.zip
crimson: set result = 0 when op.flags include CEPH_OSD_OP_FLAG_FAILOK
Signed-off-by: Chunmei Liu <chunmei.liu@intel.com>
Diffstat (limited to '')
-rw-r--r--src/crimson/osd/pg.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc
index 1efb388b393..dadbc8dd54a 100644
--- a/src/crimson/osd/pg.cc
+++ b/src/crimson/osd/pg.cc
@@ -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);