From: Josh Durgin Date: Tue, 18 Feb 2014 06:42:13 +0000 (-0800) Subject: ReplicatedPG: fix successful write condition X-Git-Tag: v0.78~154^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bfbfcd6eadac2a74a2f992bdb0a4044b06f94611;p=ceph.git ReplicatedPG: fix successful write condition ctx->modify no longer implies that the operation is a write, if it ever did. These days op->may_write() is checked reliably on the OSD, so just use that instead. Signed-off-by: Josh Durgin --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 585c9bfe7e32..4467b8a9e00d 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -1722,7 +1722,7 @@ void ReplicatedPG::execute_ctx(OpContext *ctx) return; } - bool successful_write = !ctx->op_t->empty() && ctx->modify && result >= 0; + bool successful_write = !ctx->op_t->empty() && op->may_write() && result >= 0; // prepare the reply ctx->reply = new MOSDOpReply(m, 0, get_osdmap()->get_epoch(), 0, successful_write);