]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: reject PARALLELEXEC ops with EINVAL
authorSage Weil <sage@redhat.com>
Tue, 24 May 2016 18:02:32 +0000 (14:02 -0400)
committersmithfarm <ncutler@suse.com>
Tue, 29 Nov 2016 16:04:27 +0000 (17:04 +0100)
Errors are better than crashing.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 407495197dd878b62f1356f6d939e33ab50d78c6)

Conflicts:
src/osd/ReplicatedPG.cc (trivial resolution)

src/osd/ReplicatedPG.cc

index 1676a3e3c8b02489f12256b711dd68da3c33f8de..24e80dce068a76293c998d9982078fec178413fa 100644 (file)
@@ -1365,6 +1365,13 @@ void ReplicatedPG::do_op(OpRequestRef& op)
 {
   MOSDOp *m = static_cast<MOSDOp*>(op->get_req());
   assert(m->get_type() == CEPH_MSG_OSD_OP);
+
+  if (m->has_flag(CEPH_OSD_FLAG_PARALLELEXEC)) {
+    // not implemented.
+    osd->reply_op_error(op, -EINVAL);
+    return;
+  }
+
   if (op->includes_pg_op()) {
     if (pg_op_must_wait(m)) {
       wait_for_all_missing(op);
@@ -7478,12 +7485,6 @@ void ReplicatedPG::issue_repop(RepGather *repop)
 {
   OpContext *ctx = repop->ctx;
   const hobject_t& soid = ctx->obs->oi.soid;
-  if (ctx->op &&
-    ((static_cast<MOSDOp *>(
-       ctx->op->get_req()))->get_flags() & CEPH_OSD_FLAG_PARALLELEXEC)) {
-    // replicate original op for parallel execution on replica
-    assert(0 == "broken implementation, do not use");
-  }
   dout(7) << "issue_repop rep_tid " << repop->rep_tid
           << " o " << soid
           << dendl;