All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dai Ngo <dai.ngo@oracle.com>
To: chuck.lever@oracle.com, jlayton@kernel.org
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v2 2/3] NFSD: add helper to set NFSD4_CLIENT_CB_KILL to stop the callback
Date: Mon, 22 Apr 2024 20:12:32 -0700	[thread overview]
Message-ID: <1713841953-19594-3-git-send-email-dai.ngo@oracle.com> (raw)
In-Reply-To: <1713841953-19594-1-git-send-email-dai.ngo@oracle.com>

Add helper for nfs4state functions to set NFSD4_CLIENT_CB_KILL
to stop the callback.

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
---
 fs/nfsd/nfs4callback.c | 5 +++++
 fs/nfsd/state.h        | 1 +
 2 files changed, 6 insertions(+)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index f8bb5ff2e9ac..4c3a4d5df626 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -1562,3 +1562,8 @@ bool nfsd4_run_cb(struct nfsd4_callback *cb)
 		nfsd41_cb_inflight_end(clp);
 	return queued;
 }
+
+void nfsd4_kill_callback(struct nfs4_client *clp)
+{
+	set_bit(NFSD4_CLIENT_CB_KILL, &clp->cl_flags);
+}
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index f42d8d782c84..cde05c26afd8 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -757,6 +757,7 @@ struct nfsd_file *find_any_file(struct nfs4_file *f);
 
 #ifdef CONFIG_NFSD_V4
 void nfsd4_revoke_states(struct net *net, struct super_block *sb);
+void nfsd4_kill_callback(struct nfs4_client *clp);
 #else
 static inline void nfsd4_revoke_states(struct net *net, struct super_block *sb)
 {
-- 
2.39.3


  parent reply	other threads:[~2024-04-23  3:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  3:12 PATCH [v2 0/3] NFSD: drop TCP connections when NFSv4 client enters courtesy state Dai Ngo
2024-04-23  3:12 ` [PATCH v2 1/3] NFSD: mark cl_cb_state as NFSD4_CB_DOWN if cl_cb_client is NULL Dai Ngo
2024-04-23 13:41   ` Chuck Lever
2024-04-23 17:49     ` Dai Ngo
2024-04-23 18:08       ` Chuck Lever
2024-04-23 20:13         ` Dai Ngo
2024-04-23  3:12 ` Dai Ngo [this message]
2024-04-23  3:12 ` [PATCH v2 3/3] NFSD: drop TCP connections when NFSv4 client enters courtesy state Dai Ngo

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=1713841953-19594-3-git-send-email-dai.ngo@oracle.com \
    --to=dai.ngo@oracle.com \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.