]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
knfsd: Support adding transports by writing portlist file
authorTom Tucker <tom@opengridcomputing.com>
Mon, 31 Dec 2007 03:08:35 +0000 (21:08 -0600)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 1 Feb 2008 21:42:13 +0000 (16:42 -0500)
commita217813f9067b785241cb7f31956e51d2071703a
tree5bda9ab6a461562975506d2100b16db19e3e628b
parent7fcb98d58cb4d18af6386f71025fc5192f25fbca
knfsd: Support adding transports by writing portlist file

Update the write handler for the portlist file to allow creating new
listening endpoints on a transport. The general form of the string is:

<transport_name><space><port number>

For example:

echo "tcp 2049" > /proc/fs/nfsd/portlist

This is intended to support the creation of a listening endpoint for
RDMA transports without adding #ifdef code to the nfssvc.c file.

Transports can also be removed as follows:

'-'<transport_name><space><port number>

For example:

echo "-tcp 2049" > /proc/fs/nfsd/portlist

Attempting to add a listener with an invalid transport string results
in EPROTONOSUPPORT and a perror string of "Protocol not supported".

Attempting to remove an non-existent listener (.e.g. bad proto or port)
results in ENOTCONN and a perror string of
"Transport endpoint is not connected"

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>
fs/lockd/svc.c
fs/nfsd/nfsctl.c
net/sunrpc/svc_xprt.c