]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: differentiate ENOENT during do_osd_call().
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 5 Aug 2019 11:58:06 +0000 (13:58 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Sat, 24 Aug 2019 01:33:58 +0000 (03:33 +0200)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/ops_executer.cc

index 87effe33e543f5fc3fecc754b3356d8f318c4fa6..bd63f6ac2799a1d88c3cc92b45fea0854bb472f2 100644 (file)
@@ -28,10 +28,6 @@ namespace ceph::osd {
 
 seastar::future<> OpsExecuter::do_op_call(OSDOp& osd_op)
 {
-  if (!os->exists) {
-    throw ceph::osd::object_not_found();
-  }
-
   std::string cname, mname;
   ceph::bufferlist indata;
   try {
@@ -67,6 +63,10 @@ seastar::future<> OpsExecuter::do_op_call(OSDOp& osd_op)
   }
 
   const auto flags = method->get_flags();
+  if (!os->exists && (flags & CLS_METHOD_WR) == 0) {
+    throw ceph::osd::object_not_found{};
+  }
+
 #if 0
   if (flags & CLS_METHOD_WR) {
     ctx->user_modify = true;