From: Jeff Layton <jlayton@kernel.org>
To: NeilBrown <neilb@suse.de>, Chuck Lever <chuck.lever@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 01/14] lockd: remove SIGKILL handling.
Date: Thu, 20 Jul 2023 16:05:02 -0400 [thread overview]
Message-ID: <b58d657859e5a05e73c6c92fa258e525ff199466.camel@kernel.org> (raw)
In-Reply-To: <168966228859.11075.13570585046156408745.stgit@noble.brown>
On Tue, 2023-07-18 at 16:38 +1000, NeilBrown wrote:
> lockd allows SIGKILL and responds by dropping all locks and restarting
> the grace period. This functionality has been present since 2.1.32 when
> lockd was added to Linux.
>
> This functionality is undocumented and most liked added as a useful
> debug aid. When there is a need to drop locks, the best approach is
> using /proc/fs/nfsd/unlock_*.
>
> This patch removes the handling of SIGKILL as part of preparation for
> removing all signal handling from sunrpc service threads.
>
> Signed-off-by: NeilBrown <neilb@suse.de>
> ---
> fs/lockd/svc.c | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
> index 22d3ff3818f5..614faa5f69cd 100644
> --- a/fs/lockd/svc.c
> +++ b/fs/lockd/svc.c
> @@ -45,7 +45,6 @@
>
> #define NLMDBG_FACILITY NLMDBG_SVC
> #define LOCKD_BUFSIZE (1024 + NLMSVC_XDRSIZE)
> -#define ALLOWED_SIGS (sigmask(SIGKILL))
>
> static struct svc_program nlmsvc_program;
>
> @@ -111,19 +110,6 @@ static void set_grace_period(struct net *net)
> schedule_delayed_work(&ln->grace_period_end, grace_period);
> }
>
> -static void restart_grace(void)
> -{
> - if (nlmsvc_ops) {
> - struct net *net = &init_net;
> - struct lockd_net *ln = net_generic(net, lockd_net_id);
> -
> - cancel_delayed_work_sync(&ln->grace_period_end);
> - locks_end_grace(&ln->lockd_manager);
> - nlmsvc_invalidate_all();
> - set_grace_period(net);
> - }
> -}
> -
> /*
> * This is the lockd kernel thread
> */
> @@ -138,9 +124,6 @@ lockd(void *vrqstp)
> /* try_to_freeze() is called from svc_recv() */
> set_freezable();
>
> - /* Allow SIGKILL to tell lockd to drop all of its locks */
> - allow_signal(SIGKILL);
> -
> dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");
>
> /*
> @@ -154,12 +137,6 @@ lockd(void *vrqstp)
> /* update sv_maxconn if it has changed */
> rqstp->rq_server->sv_maxconn = nlm_max_connections;
>
> - if (signalled()) {
> - flush_signals(current);
> - restart_grace();
> - continue;
> - }
> -
> timeout = nlmsvc_retry_blocked();
>
> /*
> @@ -174,7 +151,6 @@ lockd(void *vrqstp)
>
> svc_process(rqstp);
> }
> - flush_signals(current);
> if (nlmsvc_ops)
> nlmsvc_invalidate_all();
> nlm_shutdown_hosts();
>
>
Nice to finally do this!
Reviewed-by: Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2023-07-20 20:05 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 6:38 [PATCH 00/14] Refactor SUNRPC svc thread code, and use llist NeilBrown
2023-07-18 6:38 ` [PATCH 04/14] SUNRPC: change svc_recv() to return void NeilBrown
2023-07-18 13:26 ` Chuck Lever
2023-07-20 20:02 ` Jeff Layton
2023-07-18 6:38 ` [PATCH 03/14] SUNRPC: call svc_process() from svc_recv() NeilBrown
2023-07-20 20:07 ` Jeff Layton
2023-07-18 6:38 ` [PATCH 08/14] SUNRPC: integrate back-channel processing with svc_recv() and svc_process() NeilBrown
2023-07-20 20:16 ` Jeff Layton
2023-07-18 6:38 ` [PATCH 10/14] SUNRPC: change svc_pool_wake_idle_thread() to return nothing NeilBrown
2023-07-18 13:58 ` Chuck Lever
2023-07-19 1:16 ` NeilBrown
2023-07-19 13:12 ` Chuck Lever III
2023-07-19 23:20 ` NeilBrown
2023-07-19 23:44 ` Chuck Lever III
2023-07-20 14:29 ` Chuck Lever III
2023-07-24 0:03 ` NeilBrown
2023-07-24 4:44 ` NeilBrown
2023-07-25 13:49 ` Chuck Lever III
2023-07-18 6:38 ` [PATCH 02/14] nfsd: don't allow nfsd threads to be signalled NeilBrown
2023-07-20 20:05 ` Jeff Layton
2023-07-18 6:38 ` [PATCH 09/14] SUNRPC: change how svc threads are asked to exit NeilBrown
2023-07-20 20:30 ` Jeff Layton
2023-07-20 21:32 ` NeilBrown
2023-07-18 6:38 ` [PATCH 11/14] SUNRPC: add list of idle threads NeilBrown
2023-07-18 6:38 ` [PATCH 07/14] SUNRPC: refactor svc_recv() NeilBrown
2023-07-18 13:49 ` Chuck Lever
2023-07-18 6:38 ` [PATCH 13/14] SUNRPC: change service idle list to be an llist NeilBrown
2023-07-18 6:38 ` [PATCH 06/14] SUNRPC: change various server-side #defines to enum NeilBrown
2023-07-18 13:37 ` Chuck Lever
2023-07-30 15:57 ` Chuck Lever
2023-07-30 22:11 ` NeilBrown
2023-07-30 22:14 ` NeilBrown
2023-07-30 22:16 ` Chuck Lever III
2023-07-30 22:56 ` NeilBrown
2023-07-30 22:57 ` Chuck Lever III
2023-07-30 23:19 ` Chuck Lever III
2023-07-18 6:38 ` [PATCH 05/14] SUNRPC: remove timeout arg from svc_recv() NeilBrown
2023-07-20 20:12 ` Jeff Layton
2023-07-18 6:38 ` [PATCH 14/14] SUNRPC: only have one thread waking up at a time NeilBrown
2023-07-18 6:38 ` [PATCH 01/14] lockd: remove SIGKILL handling NeilBrown
2023-07-20 20:05 ` Jeff Layton [this message]
2023-07-18 6:38 ` [PATCH 12/14] SUNRPC: discard SP_CONGESTED NeilBrown
2023-07-18 18:12 ` [PATCH 00/14] Refactor SUNRPC svc thread code, and use llist Chuck Lever III
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b58d657859e5a05e73c6c92fa258e525ff199466.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).