aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc.c
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-10-04 05:16:01 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:17 -0400
commitabd1f50094cad9dff6d68ada98b495549f52fc30 (patch)
treedd738067aa90af1cb4613a7c711ee426ff5f8ae9 /fs/lockd/svc.c
parent350fce8dbf43f7d441b77366851c9ce3cd28d6dc (diff)
[PATCH] knfsd: lockd: optionally use hostnames for identifying peers
This patch adds the nsm_use_hostnames sysctl and module param. If set, lockd will use the client's name (as given in the NLM arguments) to find the NSM handle. This makes recovery work when the NFS peer is multi-homed, and the reboot notification arrives from a different IP than the original lock calls. Signed-off-by: Olaf Kirch <okir@suse.de> 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 'fs/lockd/svc.c')
-rw-r--r--fs/lockd/svc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index 3cc369e5693f..a3b7602cd383 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -61,6 +61,7 @@ static DECLARE_WAIT_QUEUE_HEAD(lockd_exit);
61static unsigned long nlm_grace_period; 61static unsigned long nlm_grace_period;
62static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO; 62static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO;
63static int nlm_udpport, nlm_tcpport; 63static int nlm_udpport, nlm_tcpport;
64int nsm_use_hostnames = 0;
64 65
65/* 66/*
66 * Constants needed for the sysctl interface. 67 * Constants needed for the sysctl interface.
@@ -395,6 +396,14 @@ static ctl_table nlm_sysctls[] = {
395 .extra1 = (int *) &nlm_port_min, 396 .extra1 = (int *) &nlm_port_min,
396 .extra2 = (int *) &nlm_port_max, 397 .extra2 = (int *) &nlm_port_max,
397 }, 398 },
399 {
400 .ctl_name = CTL_UNNUMBERED,
401 .procname = "nsm_use_hostnames",
402 .data = &nsm_use_hostnames,
403 .maxlen = sizeof(int),
404 .mode = 0644,
405 .proc_handler = &proc_dointvec,
406 },
398 { .ctl_name = 0 } 407 { .ctl_name = 0 }
399}; 408};
400 409
@@ -483,6 +492,7 @@ module_param_call(nlm_udpport, param_set_port, param_get_int,
483 &nlm_udpport, 0644); 492 &nlm_udpport, 0644);
484module_param_call(nlm_tcpport, param_set_port, param_get_int, 493module_param_call(nlm_tcpport, param_set_port, param_get_int,
485 &nlm_tcpport, 0644); 494 &nlm_tcpport, 0644);
495module_param(nsm_use_hostnames, bool, 0644);
486 496
487/* 497/*
488 * Initialising and terminating the module. 498 * Initialising and terminating the module.