]> git.hungrycats.org Git - linux/commit
[PATCH] make NFS lockd port numbers assignable at run time
authorJamie Lokier <jamie@shareable.org>
Sun, 17 Aug 2003 10:56:06 +0000 (03:56 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Sun, 17 Aug 2003 10:56:06 +0000 (03:56 -0700)
commit3fd4a6458b91de92ce50d3b63146663c9200a074
treea758198c4fc1d2796b2b92117715b5e5fadd5e3b
parent47da214c1ced0687df0b8b7e504f4cb7c8000112
[PATCH] make NFS lockd port numbers assignable at run time

When writing firewall rules, and you are serving NFS, it's really
useful to know the port numbers of the various NFS services.  nfsd has
a standard value; mountd and statd are userspace daemons, and those
ports are settable on the command line.

The fiddly one is lockd.  nlm_udpport and nlm_tcpport can be set on
the kernel command line or at module load time, but after that it's a
bit awkward (particularly as the lockd module can't be unloaded safely
- "rmmod -f lockd" sometimes panics).

This patch allows the port numbers and the other lockd parameters to
be set through files in /proc/sys/fs/nfs/nlm_*.  The port numbers take
effect when lockd is next started or restarted.

In order to install the sysctl table even when compiled into the
kernel, it was necessary to update the initialisation code to the
current methods, using module_init() et al.  This patch does that and
in so doing updates the module/kernel parameters to use the 2.6
module_param() method, as well as making the numeric range changes
consistent between the two.
fs/lockd/svc.c
include/linux/lockd/lockd.h