]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: reject PARALLELEXEC ops with EINVAL 9997/head
authorSage Weil <sage@redhat.com>
Tue, 24 May 2016 18:02:32 +0000 (14:02 -0400)
committerLoic Dachary <ldachary@redhat.com>
Wed, 29 Jun 2016 08:22:11 +0000 (10:22 +0200)
Errors are better than crashing.

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

src/osd/ReplicatedPG.cc

index fd139be9a767914840b785bedab5528ead0f41e6..3a276cb945c3bf9ecc77f01db3c88af495440d51 100644 (file)
@@ -1589,6 +1589,12 @@ void ReplicatedPG::do_op(OpRequestRef& op)
   m->finish_decode();
   m->clear_payload();
 
+  if (m->has_flag(CEPH_OSD_FLAG_PARALLELEXEC)) {
+    // not implemented.
+    osd->reply_op_error(op, -EINVAL);
+    return;
+  }
+
   if (op->rmw_flags == 0) {
     int r = osd->osd->init_op_flags(op);
     if (r) {
@@ -8440,12 +8446,6 @@ void ReplicatedPG::eval_repop(RepGather *repop)
 void ReplicatedPG::issue_repop(RepGather *repop, OpContext *ctx)
 {
   const hobject_t& soid = ctx->obs->oi.soid;
-  if (ctx->op &&
-    ((static_cast<MOSDOp *>(
-       ctx->op->get_req()))->has_flag(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;