From: Jeff Layton <jlayton@kernel.org>
To: Lorenzo Bianconi <lorenzo@kernel.org>, linux-nfs@vger.kernel.org
Cc: lorenzo.bianconi@redhat.com, chuck.lever@oracle.com, neilb@suse.de
Subject: Re: [PATCH] NFSD: add version field to nfsd_rpc_status_show handler
Date: Tue, 08 Aug 2023 07:41:53 -0400 [thread overview]
Message-ID: <f7072b411e4a8f5d58e2c6a7982d393efa248408.camel@kernel.org> (raw)
In-Reply-To: <6431d0ea2295a1e128f83cd76a419dee161e4c44.1691482815.git.lorenzo@kernel.org>
On Tue, 2023-08-08 at 10:21 +0200, Lorenzo Bianconi wrote:
> Introduce version field to nfsd_rpc_status handler in order to help
> the user to maintain backward compatibility.
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> fs/nfsd/nfssvc.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 33ad91dd3a2d..6d5feeeb09a7 100644
> --- a/fs/nfsd/nfssvc.c
> +++ b/fs/nfsd/nfssvc.c
> @@ -1117,6 +1117,9 @@ int nfsd_stats_release(struct inode *inode, struct file *file)
> return ret;
> }
>
> +/* Increment NFSD_RPC_STATUS_VERSION adding new info to the handler */
> +#define NFSD_RPC_STATUS_VERSION 1
> +
> static int nfsd_rpc_status_show(struct seq_file *m, void *v)
> {
> struct inode *inode = file_inode(m->file);
> @@ -1125,6 +1128,8 @@ static int nfsd_rpc_status_show(struct seq_file *m, void *v)
>
> rcu_read_lock();
>
> + seq_printf(m, "# version %u\n", NFSD_RPC_STATUS_VERSION);
> +
> for (i = 0; i < nn->nfsd_serv->sv_nrpools; i++) {
> struct svc_rqst *rqstp;
>
Should we also add a line that starts with '#' to show what the fields
indicate? Either way, this is fine:
Reviewed-by: Jeff Layton <jlayton@kernel.org>
prev parent reply other threads:[~2023-08-08 19:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 8:21 [PATCH] NFSD: add version field to nfsd_rpc_status_show handler Lorenzo Bianconi
2023-08-08 11:33 ` NeilBrown
2023-08-08 13:24 ` Chuck Lever
2023-08-08 13:48 ` Jeff Layton
2023-08-08 14:03 ` Chuck Lever
2023-08-08 14:20 ` Jeff Layton
2023-08-08 15:18 ` Chuck Lever
2023-08-08 21:45 ` NeilBrown
2023-08-09 1:04 ` Chuck Lever
2023-08-09 1:29 ` NeilBrown
2023-08-08 17:56 ` Chuck Lever
2023-08-09 7:49 ` Lorenzo Bianconi
2023-08-09 12:53 ` Chuck Lever
2023-08-08 21:32 ` NeilBrown
2023-08-08 11:41 ` Jeff Layton [this message]
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=f7072b411e4a8f5d58e2c6a7982d393efa248408.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=lorenzo@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