]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: fix successful write condition
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 18 Feb 2014 06:42:13 +0000 (22:42 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 18 Feb 2014 20:34:33 +0000 (12:34 -0800)
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 <josh.durgin@inktank.com>
src/osd/ReplicatedPG.cc

index 585c9bfe7e320775bb1855b0f06e1ecb4aefc2e6..4467b8a9e00d470812d4569cebfc31d8f800677e 100644 (file)
@@ -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);