diff options
author | Greg Banks <gnb@melbourne.sgi.com> | 2006-10-04 05:15:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:55:16 -0400 |
commit | 7adae489fe794e3e203ff168595f635d0b845e59 (patch) | |
tree | f20544b72bdaea7cff0d340b5b4e5bfcaf2ce8fb /fs/nfsd/nfs4xdr.c | |
parent | 3cc03b164cf01c6f36e64720b58610d292fb26f7 (diff) |
[PATCH] knfsd: Prepare knfsd for support of rsize/wsize of up to 1MB, over TCP
The limit over UDP remains at 32K. Also, make some of the apparently
arbitrary sizing constants clearer.
The biggest change here involves replacing NFSSVC_MAXBLKSIZE by a function of
the rqstp. This allows it to be different for different protocols (udp/tcp)
and also allows it to depend on the servers declared sv_bufsiz.
Note that we don't actually increase sv_bufsz for nfs yet. That comes next.
Signed-off-by: Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index df341956254e..4cfacc557b40 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c | |||
@@ -1536,12 +1536,12 @@ out_acl: | |||
1536 | if (bmval0 & FATTR4_WORD0_MAXREAD) { | 1536 | if (bmval0 & FATTR4_WORD0_MAXREAD) { |
1537 | if ((buflen -= 8) < 0) | 1537 | if ((buflen -= 8) < 0) |
1538 | goto out_resource; | 1538 | goto out_resource; |
1539 | WRITE64((u64) NFSSVC_MAXBLKSIZE); | 1539 | WRITE64((u64) svc_max_payload(rqstp)); |
1540 | } | 1540 | } |
1541 | if (bmval0 & FATTR4_WORD0_MAXWRITE) { | 1541 | if (bmval0 & FATTR4_WORD0_MAXWRITE) { |
1542 | if ((buflen -= 8) < 0) | 1542 | if ((buflen -= 8) < 0) |
1543 | goto out_resource; | 1543 | goto out_resource; |
1544 | WRITE64((u64) NFSSVC_MAXBLKSIZE); | 1544 | WRITE64((u64) svc_max_payload(rqstp)); |
1545 | } | 1545 | } |
1546 | if (bmval1 & FATTR4_WORD1_MODE) { | 1546 | if (bmval1 & FATTR4_WORD1_MODE) { |
1547 | if ((buflen -= 4) < 0) | 1547 | if ((buflen -= 4) < 0) |
@@ -2055,7 +2055,7 @@ nfsd4_encode_read(struct nfsd4_compoundres *resp, int nfserr, | |||
2055 | 2055 | ||
2056 | RESERVE_SPACE(8); /* eof flag and byte count */ | 2056 | RESERVE_SPACE(8); /* eof flag and byte count */ |
2057 | 2057 | ||
2058 | maxcount = NFSSVC_MAXBLKSIZE; | 2058 | maxcount = svc_max_payload(resp->rqstp); |
2059 | if (maxcount > read->rd_length) | 2059 | if (maxcount > read->rd_length) |
2060 | maxcount = read->rd_length; | 2060 | maxcount = read->rd_length; |
2061 | 2061 | ||