summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-05-24 12:58:04 +0530
committerAnand Avati <avati@redhat.com>2012-05-24 17:32:32 -0700
commit89b3466373191b7d2f0001778308b2393ea74da6 (patch)
tree00a69678ad54be29d9b487c2f01a70ffeaeceef7 /xlators/nfs
parent9f81eb0b24f27ea9797bb8a4ff062e6f77e872fd (diff)
rpc: fix the vecsizer issue
* currently, we needed 'base-address' of the header for glusterfs writev vecsizer and 'current-address' of the buffer which is reading the data on socket, for nfs write vecsizer. * nfs write issues started coming after http://review.gluster.com/3182 was pushed into repo, now fixed. * fixed by sending both as argument for vecsizer from the transport Change-Id: I6db360ce265ce5f083f1794ebdb3867f8cfad9ec Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 824472 Reviewed-on: http://review.gluster.com/3431 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/nfs3.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/nfs3.c b/xlators/nfs/server/src/nfs3.c
index f950b9273ee..684123958b8 100644
--- a/xlators/nfs/server/src/nfs3.c
+++ b/xlators/nfs/server/src/nfs3.c
@@ -2238,17 +2238,18 @@ out:
int
-nfs3svc_write_vecsizer (int state, ssize_t *readsize, char *addr)
+nfs3svc_write_vecsizer (int state, ssize_t *readsize, char *base_addr,
+ char *curr_addr)
{
- int ret = 0;
- uint32_t fhlen = 0;
- uint32_t fhlen_n = 0;
+ int ret = 0;
+ uint32_t fhlen = 0;
+ uint32_t fhlen_n = 0;
if (state == 0) {
ret = NFS3_VECWRITE_READFHLEN;
*readsize = 4;
} else if (state == NFS3_VECWRITE_READFHLEN) {
- fhlen_n = *(uint32_t *)(addr - 4);
+ fhlen_n = *(uint32_t *)(curr_addr - 4);
fhlen = ntohl (fhlen_n);
*readsize = xdr_length_round_up (fhlen, NFS3_FHSIZE);
ret = NFS3_VECWRITE_READFH;