From: Prabhakar Pujeri <prabhakar.pujeri@dell.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: Prabhakar Pujeri <prabhakar.pujeri@dell.com>,
linux-nfs@vger.kernel.org, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH v2 1/2] nfsd: add a Netlink dump of NFSv4 clients
Date: Thu, 3 Sep 2026 05:45:01 +0000 [thread overview]
Message-ID: <20260903054501.1365-1-prabhakar.pujeri@dell.com> (raw)
In-Reply-To: <31530d8e7bc120ae48d018001e126ad345995d9c.camel@kernel.org>
On Tue, 2026-09-01 at 14:02 +0000, Jeff Layton wrote:
> I'd call this nfsd_nl_find_client() as we usually use "get" in terms of
> reference counting.
Good point, renamed in v3.
> This means that table == NFSD4_NL_CLIENT_DONE means the same an
> "UNCONFIRMED". The caller shouldn't call it in that case I guess, but
> this is a lack of defensive programming.
Fixed: nfsd_nl_find_client() now selects the table via an explicit
switch and returns NULL for any unexpected value.
> In nfsd, we often use "put" with reference counting, so looking at this
> cold, this is confusingly named. Maybe change this to be named
> nfsd4_nl_client_marshal_address() ?
Renamed as suggested.
> This while loop is a bit too clever for our own good. cb->args[0] is
> effectively a state enum, so why are we incrementing through its
> values? It's looking at confirmed, then unconfirmed clients, but that's
> not evident here.
Agreed; the table ordering is now documented where the loop is, and the
comment states that args[0..2] track table, bucket, and offset. The
enum itself keeps its declaration order (confirmed, unconfirmed, done),
so the iteration order is visible at both sites.
(Alternatively, if you would prefer an explicit two-phase loop over an
array of tables rather than relying on enum order, say so and I'll
restructure it that way instead.)
Thanks for the review!
-- Prabhakar
next prev parent reply other threads:[~2026-09-03 5:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 9:27 [PATCH v2 0/2] nfsd: expose NFSv4 client state through Netlink Prabhakar Pujeri
2026-08-31 9:27 ` [PATCH v2 1/2] nfsd: add a Netlink dump of NFSv4 clients Prabhakar Pujeri
2026-09-01 14:02 ` Jeff Layton
2026-09-03 5:45 ` Prabhakar Pujeri [this message]
2026-08-31 9:27 ` [PATCH v2 2/2] nfsd: report per-client NFSv4 state usage through Netlink Prabhakar Pujeri
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=20260903054501.1365-1-prabhakar.pujeri@dell.com \
--to=prabhakar.pujeri@dell.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox