kernel-ark/include
Wendy Cheng 4373ea84c8 lockd: unlock lockd locks associated with a given server ip
For high-availability NFS service, we generally need to be able to drop
file locks held on the exported filesystem before moving clients to a
new server.  Currently the only way to do that is by shutting down lockd
entirely, which is often undesireable (for example, if you want to
continue exporting other filesystems).

This patch allows the administrator to release all locks held by clients
accessing the client through a given server ip address, by echoing that
address to a new file, /proc/fs/nfsd/unlock_ip, as in:

shell> echo 10.1.1.2 > /proc/fs/nfsd/unlock_ip

The expected sequence of events can be:
1. Tear down the IP address
2. Unexport the path
3. Write IP to /proc/fs/nfsd/unlock_ip to unlock files
4. Signal peer to begin take-over.

For now we only support IPv4 addresses and NFSv2/v3 (NFSv4 locks are not
affected).

Also, if unmounting the filesystem is required, we assume at step 3 that
clients using the given server ip are the only clients holding locks on
the given filesystem; otherwise, an additional patch is required to
allow revoking all locks held by lockd on a given filesystem.

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Cc: Lon Hohberger  <lhh@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

 fs/lockd/svcsubs.c          |   66 +++++++++++++++++++++++++++++++++++++++-----
 fs/nfsd/nfsctl.c            |   65 +++++++++++++++++++++++++++++++++++++++++++
 include/linux/lockd/lockd.h |    7 ++++
 3 files changed, 131 insertions(+), 7 deletions(-)
2008-04-25 13:00:10 -04:00
..
acpi ACPI, cpuidle: Clarify C-state description in sysfs 2008-02-14 00:09:55 -05:00
asm-alpha asm-generic: add node_to_cpumask_ptr macro 2008-04-19 19:44:58 +02:00
asm-arm Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc 2008-04-21 17:23:30 -07:00
asm-avr32 avr32: add include/asm-avr32/serial.h 2008-04-19 20:40:10 -04:00
asm-blackfin [Blackfin] arch: add include/boot .gitignore files 2008-04-25 08:29:11 +08:00
asm-cris Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-frv frv: remove HARD_RESET_NOW() 2008-04-21 16:03:13 -07:00
asm-generic asm-generic: add node_to_cpumask_ptr macro 2008-04-19 19:44:58 +02:00
asm-h8300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-ia64 [IA64] move XP and XPC to drivers/misc/sgi-xp 2008-04-22 15:08:17 -07:00
asm-m32r Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-m68k Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-m68knommu Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-mips Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-mn10300 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-parisc Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6 2008-04-18 08:39:24 -07:00
asm-powerpc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc 2008-04-21 15:50:49 -07:00
asm-ppc include: Remove unnecessary inclusions of asm/semaphore.h 2008-04-18 22:16:54 -04:00
asm-s390 Merge branch 'semaphore' of git://git.kernel.org/pub/scm/linux/kernel/git/willy/misc 2008-04-18 08:25:29 -07:00
asm-sh i2c: Renesas SH7760 I2C master driver 2008-04-22 22:16:47 +02:00
asm-sparc [SPARC64]: NUMA device infrastructure. 2008-04-23 23:32:16 -07:00
asm-sparc64 [SPARC64]: %l6 trap return handling no longer necessary. 2008-04-24 03:15:22 -07:00
asm-um Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-v850 Generic semaphore implementation 2008-04-17 10:42:34 -04:00
asm-x86 "make namespacecheck" fixes 2008-04-24 23:15:44 +02:00
asm-xtensa Generic semaphore implementation 2008-04-17 10:42:34 -04:00
crypto [CRYPTO] aes: Export generic setkey 2008-04-21 10:19:34 +08:00
keys KEYS: Fix the comment to match the file name in rxrpc-type.h. 2008-04-21 22:43:55 +00:00
linux lockd: unlock lockd locks associated with a given server ip 2008-04-25 13:00:10 -04:00
math-emu
media V4L/DVB (7677): saa7134: Add/fix Beholder entries 2008-04-24 14:09:46 -03:00
mtd
net IPv6 support for NFS server export caches 2008-04-23 16:13:36 -04:00
pcmcia
rdma IB: convert struct class_device to struct device 2008-04-19 19:10:30 -07:00
rxrpc
scsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-2.6 2008-04-21 15:49:58 -07:00
sound [ALSA] Define MPU401 registers in sound/mpu401_uart.h 2008-04-24 12:38:22 +02:00
video
xen
Kbuild