From: Josh Durgin Date: Fri, 17 Jun 2016 21:49:33 +0000 (-0700) Subject: ReplicatedPG: require kraken feature bit on osdmap to record write errors in the... X-Git-Tag: ses5-milestone5~413^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fa8aff9a255b097e0e3d88fa25397ab2e8698a66;p=ceph.git ReplicatedPG: require kraken feature bit on osdmap to record write errors in the pg log Older OSDs can't handle the error entries. Signed-off-by: Josh Durgin --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 5e216f23a1a1..47f9f945966f 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1914,7 +1914,8 @@ void ReplicatedPG::do_op(OpRequestRef& op) return; } dout(20) << __func__ << "find_object_context got error " << r << dendl; - if (op->may_write()) { + if (op->may_write() && + get_osdmap()->test_flag(CEPH_OSDMAP_REQUIRE_KRAKEN)) { record_write_error(op, oid, nullptr, r); } else { osd->reply_op_error(op, r); @@ -2090,7 +2091,8 @@ void ReplicatedPG::do_op(OpRequestRef& op) if (r) { dout(20) << __func__ << " returned an error: " << r << dendl; close_op_ctx(ctx); - if (op->may_write()) { + if (op->may_write() && + get_osdmap()->test_flag(CEPH_OSDMAP_REQUIRE_KRAKEN)) { record_write_error(op, oid, nullptr, r); } else { osd->reply_op_error(op, r); @@ -6660,7 +6662,8 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx) // prepare the actual mutation int result = do_osd_ops(ctx, ctx->ops); if (result < 0) { - if (ctx->op->may_write()) { + if (ctx->op->may_write() && + get_osdmap()->test_flag(CEPH_OSDMAP_REQUIRE_KRAKEN)) { // need to save the error code in the pg log, to detect dup ops, // but do nothing else ctx->update_log_only = true;