summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3-helpers.c
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2010-05-09 23:13:54 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-10 02:18:04 -0700
commit2848a53f53b414e8289bce1527ce0cee78719b70 (patch)
tree2931479387898f22b3e69da603ee51e658800892 /xlators/nfs/server/src/nfs3-helpers.c
parent80c3061c07c46b4ac11beb5f0ebad08b8af2cafe (diff)
nfs3: Round-up read reply bytes of multi-vector reply
A previos commit brought in support for returning read replies when subvolumes return reads in multiple iovecs. This did not completely fix the problem since the bytes in iovecs all together could be unaligned with the 4 byte boundary as needed by XDR for the opaque data. This resulted in read requests being either retransmitted or rejected with an error message in syslog on the NFS client. Signed-off-by: Shehjar Tikoo <shehjart@dev.gluster.com> Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 902 (iozone hangs during random read throughput test) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=902
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.c')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
index 0d0007745..e929bb311 100644
--- a/xlators/nfs/server/src/nfs3-helpers.c
+++ b/xlators/nfs/server/src/nfs3-helpers.c
@@ -1529,9 +1529,7 @@ nfs3_fill_read3res (read3res *res, nfsstat3 stat, count3 count,
res->read3res_u.resok.file_attributes = poa;
res->read3res_u.resok.count = count;
res->read3res_u.resok.eof = is_eof;
- res->read3res_u.resok.data.data_len = xdr_length_round_up (count,
- 1048576);
-
+ res->read3res_u.resok.data.data_len = count;
}