svc: Add a transport function that checks for write space
authorTom Tucker <tom@opengridcomputing.com>
Mon, 31 Dec 2007 03:07:31 +0000 (21:07 -0600)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 1 Feb 2008 21:42:08 +0000 (16:42 -0500)
commit323bee32e9bef14c6dd943ecc8e8cd373a9c94d9
tree5779a724dfcbe3aee1f06d9eb989931d1dcfa163
parente831fe65b10199e1e301a7316c66d6ced133712d
svc: Add a transport function that checks for write space

In order to avoid blocking a service thread, the receive side checks
to see if there is sufficient write space to reply to the request.
Each transport has a different mechanism for determining if there is
enough write space to reply.

The code that checked for write space was coupled with code that
checked for CLOSE and CONN. These checks have been broken out into
separate statements to make the code easier to read.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Acked-by: Neil Brown <neilb@suse.de>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Greg Banks <gnb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
include/linux/sunrpc/svc_xprt.h
net/sunrpc/svcsock.c