From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mikael Davranche Subject: [PATCH 3/3] NLM: Proposal for a timeout setting on blocking locks Date: Tue, 11 Mar 2008 13:18:51 +0100 Message-ID: <1205237931.47d678ab121ab@imp.free.fr> References: <1205237665.47d677a143941@imp.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT To: Trond Myklebust , Trond Myklebust , linux-fsdevel Return-path: Received: from postfix2-g20.free.fr ([212.27.60.43]:40874 "EHLO postfix2-g20.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbYCKMU4 (ORCPT ); Tue, 11 Mar 2008 08:20:56 -0400 Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by postfix2-g20.free.fr (Postfix) with ESMTP id E8901244D07C for ; Tue, 11 Mar 2008 11:20:22 +0100 (CET) In-Reply-To: <1205237665.47d677a143941@imp.free.fr> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: # diff -u a/fs/lockd/svc.c b/fs/lockd/svc.c --- a/fs/lockd/svc.c Tue Feb 26 01:20:20 2008 +++ b/fs/lockd/svc.c Mon Mar 10 16:21:58 2008 @@ -62,6 +62,7 @@ */ static unsigned long nlm_grace_period; static unsigned long nlm_timeout = LOCKD_DFLT_TIMEO; +unsigned long nlm_clnt_poll_timeout = NLMCLNT_POLL_TIMEOUT; static int nlm_udpport, nlm_tcpport; int nsm_use_hostnames = 0; @@ -72,6 +73,8 @@ static const unsigned long nlm_grace_period_max = 240; static const unsigned long nlm_timeout_min = 3; static const unsigned long nlm_timeout_max = 20; +static const unsigned long nlm_clnt_poll_timeout_min = 1; +static const unsigned long nlm_clnt_poll_timeout_max = 30; static const int nlm_port_min = 0, nlm_port_max = 65535; static struct ctl_table_header * nlm_sysctl_table; @@ -391,6 +394,16 @@ }, { .ctl_name = CTL_UNNUMBERED, + .procname = "nlm_clnt_poll_timeout", + .data = &nlm_clnt_poll_timeout, + .maxlen = sizeof(unsigned long), + .mode = 0644, + .proc_handler = &proc_doulongvec_minmax, + .extra1 = (unsigned long *) &nlm_clnt_poll_timeout_min, + .extra2 = (unsigned long *) &nlm_clnt_poll_timeout_max, + }, + { + .ctl_name = CTL_UNNUMBERED, .procname = "nlm_udpport", .data = &nlm_udpport, .maxlen = sizeof(int), @@ -514,6 +527,8 @@ module_param_call(nlm_tcpport, param_set_port, param_get_int, &nlm_tcpport, 0644); module_param(nsm_use_hostnames, bool, 0644); +module_param_call(nlm_clnt_poll_timeout, param_set_timeout, param_get_ulong, + &nlm_clnt_poll_timeout, 0644); /* * Initialising and terminating the module.