From 057e292380cc763ddd4a737d84f406406eaf6d36 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 23 Jan 2014 18:18:02 +0100 Subject: protocol: pass the size of the data in the WRITE on-wire FOP Capturing GlusterFS traffic with tcpdump and displaying it in Wireshark shows that the size of all WRITEs are 0 bytes. It seems that the attribute is not used, and the size is calculated an other way. Even if the size attribute is not used (yet), it should be set correctly to prevent confusing while debugging network traffic with Wireshark or other tools. Note that the on-wire format is not being changed with this patch. The size is already part of the structure that is exchanged between the client and server. Change-Id: I9d67fe17bf203672116dea4948328e2af4004677 BUG: 1057264 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/6766 Tested-by: Gluster Build System Reviewed-by: Vikhyat Umrao --- xlators/protocol/client/src/client.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/protocol/client') diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index d8c5f4262..b0a71d3f9 100644 --- a/xlators/protocol/client/src/client.c +++ b/xlators/protocol/client/src/client.c @@ -943,6 +943,7 @@ client_writev (call_frame_t *frame, xlator_t *this, fd_t *fd, args.vector = vector; args.count = count; args.offset = off; + args.size = iov_length (vector, count); args.flags = flags; args.iobref = iobref; args.xdata = xdata; -- cgit