]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: do not return data payload for successful writes
authorSage Weil <sage@inktank.com>
Thu, 15 Aug 2013 22:06:38 +0000 (15:06 -0700)
committerSage Weil <sage@inktank.com>
Fri, 16 Aug 2013 00:21:11 +0000 (17:21 -0700)
commit610dc016e917b5dbb5b9f01112b58cd641c01b6d
tree2a617e0eaf5cab748684a36115f3a62ec3fd7c58
parent681436ada8702476be11e375d05a9eca85e0af0d
osd: do not return data payload for successful writes

We were somewhat inadvertantly returning a data payload for write
operations.  This was a side-effect of the OpContext::ops field being a
reference to MOSDOp::ops: the return data would end up there, and then
the MOSDOpReply ctor would copy it.

Fix this by breaking the ref, and making the do_op() logic also claim
return result data for error values (so that errors can return data to the
caller).

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/ReplicatedPG.cc
src/osd/ReplicatedPG.h