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/nfsproc.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/nfsproc.c')
-rw-r--r-- | fs/nfsd/nfsproc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c index ca4973150218..9ee1dab5d44a 100644 --- a/fs/nfsd/nfsproc.c +++ b/fs/nfsd/nfsproc.c | |||
@@ -146,13 +146,13 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp, | |||
146 | * status, 17 words for fattr, and 1 word for the byte count. | 146 | * status, 17 words for fattr, and 1 word for the byte count. |
147 | */ | 147 | */ |
148 | 148 | ||
149 | if (NFSSVC_MAXBLKSIZE < argp->count) { | 149 | if (NFSSVC_MAXBLKSIZE_V2 < argp->count) { |
150 | printk(KERN_NOTICE | 150 | printk(KERN_NOTICE |
151 | "oversized read request from %u.%u.%u.%u:%d (%d bytes)\n", | 151 | "oversized read request from %u.%u.%u.%u:%d (%d bytes)\n", |
152 | NIPQUAD(rqstp->rq_addr.sin_addr.s_addr), | 152 | NIPQUAD(rqstp->rq_addr.sin_addr.s_addr), |
153 | ntohs(rqstp->rq_addr.sin_port), | 153 | ntohs(rqstp->rq_addr.sin_port), |
154 | argp->count); | 154 | argp->count); |
155 | argp->count = NFSSVC_MAXBLKSIZE; | 155 | argp->count = NFSSVC_MAXBLKSIZE_V2; |
156 | } | 156 | } |
157 | svc_reserve(rqstp, (19<<2) + argp->count + 4); | 157 | svc_reserve(rqstp, (19<<2) + argp->count + 4); |
158 | 158 | ||
@@ -553,7 +553,7 @@ static struct svc_procedure nfsd_procedures2[18] = { | |||
553 | PROC(none, void, void, none, RC_NOCACHE, ST), | 553 | PROC(none, void, void, none, RC_NOCACHE, ST), |
554 | PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT), | 554 | PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT), |
555 | PROC(readlink, readlinkargs, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN/4), | 555 | PROC(readlink, readlinkargs, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN/4), |
556 | PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE/4), | 556 | PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE_V2/4), |
557 | PROC(none, void, void, none, RC_NOCACHE, ST), | 557 | PROC(none, void, void, none, RC_NOCACHE, ST), |
558 | PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT), | 558 | PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT), |
559 | PROC(create, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT), | 559 | PROC(create, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT), |