From: chunmei-liu Date: Wed, 8 Jun 2022 08:01:43 +0000 (-0700) Subject: crimson/osd: return directly when obc not exists. X-Git-Tag: v18.0.0~731^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46564%2Fhead;p=ceph.git crimson/osd: return directly when obc not exists. if goest into do_osd_ops, will set osd_op.rval, but it is not reuqired in some tests, this follow classic ceph do_op logic. Signed-off-by: chunmei-liu --- diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index b35dbff1609ea..c5c0659d5dcc4 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -285,6 +285,10 @@ ClientRequest::do_process(Ref& pg, crimson::osd::ObjectContextRef obc) return reply_op_error(pg, -EINVAL); } + if (!obc->obs.exists && !op_info.may_write()) { + return reply_op_error(pg, -ENOENT); + } + return pg->do_osd_ops(m, obc, op_info).safe_then_unpack_interruptible( [this, pg](auto submitted, auto all_completed) mutable { return submitted.then_interruptible([this, pg] {