aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-10-06 03:44:05 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-06 11:53:41 -0400
commitc6b0a9f87b82f25fa35206ec04b5160372eabab4 (patch)
tree849ed55115c95a86a3d164d674c178f9504750a5 /include/linux/sunrpc/svc.h
parent5842730de179405d80649231faa0b3f254477434 (diff)
[PATCH] knfsd: tidy up up meaning of 'buffer size' in nfsd/sunrpc
There is some confusion about the meaning of 'bufsz' for a sunrpc server. In some cases it is the largest message that can be sent or received. In other cases it is the largest 'payload' that can be included in a NFS message. In either case, it is not possible for both the request and the reply to be this large. One of the request or reply may only be one page long, which fits nicely with NFS. So we remove 'bufsz' and replace it with two numbers: 'max_payload' and 'max_mesg'. Max_payload is the size that the server requests. It is used by the server to check the max size allowed on a particular connection: depending on the protocol a lower limit might be used. max_mesg is the largest single message that can be sent or received. It is calculated as the max_payload, rounded up to a multiple of PAGE_SIZE, and with PAGE_SIZE added to overhead. Only one of the request and reply may be this size. The other must be at most one page. Cc: Greg Banks <gnb@sgi.com> Cc: "J. Bruce Fields" <bfields@fieldses.org> 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 'include/linux/sunrpc/svc.h')
-rw-r--r--include/linux/sunrpc/svc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index d6288e89fd9d..9c9a8ad92477 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -57,7 +57,8 @@ struct svc_serv {
57 struct svc_stat * sv_stats; /* RPC statistics */ 57 struct svc_stat * sv_stats; /* RPC statistics */
58 spinlock_t sv_lock; 58 spinlock_t sv_lock;
59 unsigned int sv_nrthreads; /* # of server threads */ 59 unsigned int sv_nrthreads; /* # of server threads */
60 unsigned int sv_bufsz; /* datagram buffer size */ 60 unsigned int sv_max_payload; /* datagram payload size */
61 unsigned int sv_max_mesg; /* max_payload + 1 page for overheads */
61 unsigned int sv_xdrsize; /* XDR buffer size */ 62 unsigned int sv_xdrsize; /* XDR buffer size */
62 63
63 struct list_head sv_permsocks; /* all permanent sockets */ 64 struct list_head sv_permsocks; /* all permanent sockets */