From: Sage Weil Date: Tue, 24 May 2016 18:02:32 +0000 (-0400) Subject: osd: reject PARALLELEXEC ops with EINVAL X-Git-Tag: v10.2.3~101^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F9997%2Fhead;p=ceph.git osd: reject PARALLELEXEC ops with EINVAL Errors are better than crashing. Signed-off-by: Sage Weil (cherry picked from commit 407495197dd878b62f1356f6d939e33ab50d78c6) --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index fd139be9a767..3a276cb945c3 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -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( - 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;