[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>
This commit is contained in:
committed by
Linus Torvalds
parent
3cc03b164c
commit
7adae489fe
@@ -146,13 +146,13 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
|
||||
* status, 17 words for fattr, and 1 word for the byte count.
|
||||
*/
|
||||
|
||||
if (NFSSVC_MAXBLKSIZE < argp->count) {
|
||||
if (NFSSVC_MAXBLKSIZE_V2 < argp->count) {
|
||||
printk(KERN_NOTICE
|
||||
"oversized read request from %u.%u.%u.%u:%d (%d bytes)\n",
|
||||
NIPQUAD(rqstp->rq_addr.sin_addr.s_addr),
|
||||
ntohs(rqstp->rq_addr.sin_port),
|
||||
argp->count);
|
||||
argp->count = NFSSVC_MAXBLKSIZE;
|
||||
argp->count = NFSSVC_MAXBLKSIZE_V2;
|
||||
}
|
||||
svc_reserve(rqstp, (19<<2) + argp->count + 4);
|
||||
|
||||
@@ -553,7 +553,7 @@ static struct svc_procedure nfsd_procedures2[18] = {
|
||||
PROC(none, void, void, none, RC_NOCACHE, ST),
|
||||
PROC(lookup, diropargs, diropres, fhandle, RC_NOCACHE, ST+FH+AT),
|
||||
PROC(readlink, readlinkargs, readlinkres, none, RC_NOCACHE, ST+1+NFS_MAXPATHLEN/4),
|
||||
PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE/4),
|
||||
PROC(read, readargs, readres, fhandle, RC_NOCACHE, ST+AT+1+NFSSVC_MAXBLKSIZE_V2/4),
|
||||
PROC(none, void, void, none, RC_NOCACHE, ST),
|
||||
PROC(write, writeargs, attrstat, fhandle, RC_REPLBUFF, ST+AT),
|
||||
PROC(create, createargs, diropres, fhandle, RC_REPLBUFF, ST+FH+AT),
|
||||
|
Reference in New Issue
Block a user