From add574bc9484d49fb28475d28c7a2aab57efc781 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 25 Sep 2019 13:28:30 -0500 Subject: [PATCH] messages/MOSDOpReply: ensure input payload is not passed via reply 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 --- src/messages/MOSDOpReply.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/messages/MOSDOpReply.h b/src/messages/MOSDOpReply.h index 2428c7ac839f..ed79f6587a80 100644 --- a/src/messages/MOSDOpReply.h +++ b/src/messages/MOSDOpReply.h @@ -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(); } } -- 2.47.3