From: Steve Dickson <steved@redhat.com>
To: Frank Sorenson <sorenson@redhat.com>, linux-nfs@vger.kernel.org
Cc: achillesgaikwad@gmail.com, kennethdsouza94@gmail.com
Subject: Re: [PATCH] nfsdclnts: fix display of stateids where the kernel doesn't provide the superblock
Date: Fri, 6 Mar 2026 17:11:01 -0500 [thread overview]
Message-ID: <6d8ebe30-fe56-451a-ba87-7308c0de2cf8@redhat.com> (raw)
In-Reply-To: <20260227220841.3015642-1-sorenson@redhat.com>
On 2/27/26 5:08 PM, Frank Sorenson wrote:
> If the stateid's file can't be found, the kernel will skip printing
> the superblock and filename in the 'states' procfile. When this
> happens, nfsdclnts crashes trying to reference the non-existent
> superblock key while getting the inode.
>
> Fix this by setting the inode field to 'N/A' when the superblock
> isn't present, as is done with other fields which may be missing.
>
> Signed-off-by: Frank Sorenson <sorenson@redhat.com>
Committed... (tag: nfs-utils-2-8-6-rc4)
steved.
> ---
> tools/nfsdclnts/nfsdclnts.py | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/nfsdclnts/nfsdclnts.py b/tools/nfsdclnts/nfsdclnts.py
> index b7280f2c..183a02ee 100755
> --- a/tools/nfsdclnts/nfsdclnts.py
> +++ b/tools/nfsdclnts/nfsdclnts.py
> @@ -87,7 +87,10 @@ def printer(data_list, argument):
> client_info = file_to_dict(client_info_path)
> for i in data_list:
> for key in i:
> - inode = i[key]['superblock'].split(':')[-1]
> + try:
> + inode = i[key]['superblock'].split(':')[-1]
> + except:
> + inode = 'N/A'
> # The ip address is quoted, so we dequote it.
> try:
> client_ip = client_info['address'][1:-1]
prev parent reply other threads:[~2026-03-06 22:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 22:08 [PATCH] nfsdclnts: fix display of stateids where the kernel doesn't provide the superblock Frank Sorenson
2026-03-06 22:11 ` Steve Dickson [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=6d8ebe30-fe56-451a-ba87-7308c0de2cf8@redhat.com \
--to=steved@redhat.com \
--cc=achillesgaikwad@gmail.com \
--cc=kennethdsouza94@gmail.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sorenson@redhat.com \
/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