]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ReplicatedPG: clear osd op reply output for writes
authorJosh Durgin <josh.durgin@inktank.com>
Tue, 18 Feb 2014 06:35:13 +0000 (22:35 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Tue, 18 Feb 2014 20:34:33 +0000 (12:34 -0800)
commit18f08cd9c0a3972149eef635fb1035dfc4fcb662
tree6a2f54965c1f1082b5964ffbf3d09f7f723c3960
parent1d661ca97299352ef96f923baf1ead0ef5d7bb8e
ReplicatedPG: clear osd op reply output for writes

Since the vector of OSDOps used by the reply is the same
as the one processed by do_osd_ops() now, any output data
needs to be cleared for writes. To be compatible with current behavior,
allow writes that aren't applying anything or have failed to return data
still.

Add a new parameter to the MOSDOpReply constructor to determine
whether the output data should be cleared. Clear it for successful
writes, and remove a redundant result < 0 -> result > 0 check in the
process.  This was caught by ceph_test_cls_hello and its
writes_dont_return_data method.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/messages/MOSDOpReply.h
src/osd/OSD.cc
src/osd/ReplicatedPG.cc