diff options
author | Niels de Vos <ndevos@redhat.com> | 2014-01-24 11:27:43 +0100 |
---|---|---|
committer | Kaleb KEITHLEY <kkeithle@redhat.com> | 2014-02-10 16:04:05 -0800 |
commit | 3466026bfd1504cbc95a9319147fe67af7bc1ab0 (patch) | |
tree | 2b67ecc018447443c41571e541062c67270039d8 | |
parent | 8eda793ed6762ca71521698eb80e2262b5b63092 (diff) |
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.
Master-Change-Id: I9d67fe17bf203672116dea4948328e2af4004677
Master-Reviewed-on: http://review.gluster.org/6766
Change-Id: I1168461601f725021e4b12a90bbf5afc83fe1d3d
BUG: 1057264
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6775
Reviewed-by: Vikhyat Umrao <vumrao@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
-rw-r--r-- | xlators/protocol/client/src/client.c | 1 | ||||
-rw-r--r-- | xlators/protocol/server/src/server-rpc-fops.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c index 931c67156fb..ad95574572c 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; diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index a9d2ee5b65a..88e481bf333 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -3379,6 +3379,7 @@ server3_3_writev (rpcsvc_request_t *req) state->resolve.type = RESOLVE_MUST; state->resolve.fd_no = args.fd; state->offset = args.offset; + state->size = args.size; state->flags = args.flag; state->iobref = iobref_ref (req->iobref); memcpy (state->resolve.gfid, args.gfid, 16); |