]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
messages/MOSDOpReply: ensure input payload is not passed via reply
authorSage Weil <sage@redhat.com>
Wed, 25 Sep 2019 18:28:30 +0000 (13:28 -0500)
committerSage Weil <sage@redhat.com>
Wed, 25 Sep 2019 18:29:20 +0000 (13:29 -0500)
The reply shouldn't include the input payload, for the sake of efficiency.

This has the slightly annoying side-effect that the class name and method
are no longer visible in osd_op_reply messages.  However, it does mean
that any data payload is not sent back to the client.

Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MOSDOpReply.h

index 2428c7ac839f0958bae1120f68d0d109b5f54496..ed79f6587a8014a23a46679ce059f0bb763877d5 100644 (file)
@@ -145,9 +145,11 @@ public:
     retry_attempt = req->get_retry_attempt();
     do_redirect = false;
 
-    // zero out data?
-    if (ignore_out_data) {
-      for (unsigned i = 0; i < ops.size(); i++) {
+    for (unsigned i = 0; i < ops.size(); i++) {
+      // zero out input data
+      ops[i].indata.clear();
+      if (ignore_out_data) {
+       // original request didn't set the RETURNVEC flag
        ops[i].outdata.clear();
       }
     }