mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[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 <[email protected]> Signed-off-by: Neil Brown <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
3cc03b164c
commit
7adae489fe
11 changed files with 119 additions and 34 deletions
|
|
@ -919,3 +919,18 @@ err_bad:
|
|||
svc_putnl(resv, ntohl(rpc_stat));
|
||||
goto sendit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Return (transport-specific) limit on the rpc payload.
|
||||
*/
|
||||
u32 svc_max_payload(const struct svc_rqst *rqstp)
|
||||
{
|
||||
int max = RPCSVC_MAXPAYLOAD_TCP;
|
||||
|
||||
if (rqstp->rq_sock->sk_sock->type == SOCK_DGRAM)
|
||||
max = RPCSVC_MAXPAYLOAD_UDP;
|
||||
if (rqstp->rq_server->sv_bufsz < max)
|
||||
max = rqstp->rq_server->sv_bufsz;
|
||||
return max;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(svc_max_payload);
|
||||
|
|
|
|||
Loading…
Reference in a new issue