From be7184589de9208986a2054491b86782dac938e8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 May 2016 14:02:32 -0400 Subject: [PATCH] osd: reject PARALLELEXEC ops with EINVAL Errors are better than crashing. Signed-off-by: Sage Weil (cherry picked from commit 407495197dd878b62f1356f6d939e33ab50d78c6) Conflicts: src/osd/ReplicatedPG.cc (trivial resolution) --- src/osd/ReplicatedPG.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 1676a3e3c8b02..24e80dce068a7 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1365,6 +1365,13 @@ void ReplicatedPG::do_op(OpRequestRef& op) { MOSDOp *m = static_cast(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( - 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; -- 2.39.5