From: Lorenzo Bianconi <lorenzo@kernel.org>
To: linux-nfs@vger.kernel.org
Cc: lorenzo.bianconi@redhat.com, chuck.lever@oracle.com,
jlayton@kernel.org, neilb@suse.de
Subject: [PATCH v7 1/3] SUNRPC: export nfsd4_op_name utility routine
Date: Wed, 30 Aug 2023 15:05:44 +0200 [thread overview]
Message-ID: <a5eefdeedec2b8da34596a9f84a4bfe495591c7f.1693400242.git.lorenzo@kernel.org> (raw)
In-Reply-To: <cover.1693400242.git.lorenzo@kernel.org>
This is a preliminary patch to introduce nfsd_rpc_status netlink info
in order to dump pending RPC requests debugging information.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
fs/nfsd/nfs4proc.c | 4 +---
fs/nfsd/nfsd.h | 6 ++++++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 5ca748309c26..074bac13c383 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -2485,8 +2485,6 @@ static inline void nfsd4_increment_op_stats(u32 opnum)
static const struct nfsd4_operation nfsd4_ops[];
-static const char *nfsd4_op_name(unsigned opnum);
-
/*
* Enforce NFSv4.1 COMPOUND ordering rules:
*
@@ -3616,7 +3614,7 @@ void warn_on_nonidempotent_op(struct nfsd4_op *op)
}
}
-static const char *nfsd4_op_name(unsigned opnum)
+const char *nfsd4_op_name(unsigned int opnum)
{
if (opnum < ARRAY_SIZE(nfsd4_ops))
return nfsd4_ops[opnum].op_name;
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 11c14faa6c67..e95c3322eb9b 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -511,12 +511,18 @@ extern void nfsd4_ssc_init_umount_work(struct nfsd_net *nn);
extern void nfsd4_init_leases_net(struct nfsd_net *nn);
+const char *nfsd4_op_name(unsigned int opnum);
#else /* CONFIG_NFSD_V4 */
static inline int nfsd4_is_junction(struct dentry *dentry)
{
return 0;
}
+static inline const char *nfsd4_op_name(unsigned int opnum)
+{
+ return "unknown_operation";
+}
+
static inline void nfsd4_init_leases_net(struct nfsd_net *nn) { };
#define register_cld_notifier() 0
--
2.41.0
next prev parent reply other threads:[~2023-08-30 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-30 13:05 [PATCH v7 0/3] add rpc_status netlink support for NFSD Lorenzo Bianconi
2023-08-30 13:05 ` Lorenzo Bianconi [this message]
2023-08-30 13:05 ` [PATCH v7 2/3] SUNRPC: export svc_proc_name utility routine Lorenzo Bianconi
2023-08-30 13:05 ` [PATCH v7 3/3] NFSD: add rpc_status netlink support Lorenzo Bianconi
2023-08-30 14:06 ` Chuck Lever
2023-08-30 15:16 ` Lorenzo Bianconi
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=a5eefdeedec2b8da34596a9f84a4bfe495591c7f.1693400242.git.lorenzo@kernel.org \
--to=lorenzo@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--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