From: Christoph Hellwig <hch@lst.de>
To: John Garry <john.g.garry@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>,
kbusch@kernel.org, sagi@grimberg.me, axboe@fb.com,
linux-nvme@lists.infradead.org
Subject: Re: [PATCH RFC] nvme: fix NS head cdev lifetime
Date: Wed, 8 Jul 2026 18:18:46 +0200 [thread overview]
Message-ID: <20260708161846.GA2262@lst.de> (raw)
In-Reply-To: <d27cb4a8-cf04-40ac-a271-c7d83dadc8a1@oracle.com>
On Wed, Jul 08, 2026 at 10:57:02AM +0100, John Garry wrote:
> If we put the nvne_ns_head (vs nvme_ns) in the driver data, then I can't
> see a check to know is the driver data points to a nvne_ns_head or nvme_ns.
> Unless we keep NULL for one, but that is not so nice.
I think NULL just for one is fine, and I'm pretty sure we already do
something like this in the nvme code (or at least used to in the
past).
>
>> but shouldn't we warn for the nvme_tryget_ns_head failure as well?
>> Or can that even happen here?
>>
> It should not happen as we have a pointer to nvme_ns_head. If the recount
> was zero and we referenced ns_head, then we have bigger problems.
That's what I though, so we could do a plain kref_get here.
And maybe replace the annoying krefs with a plain refcount_t one day.
next prev parent reply other threads:[~2026-07-08 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 13:01 [PATCH RFC] nvme: fix NS head cdev lifetime John Garry
2026-07-08 9:27 ` Christoph Hellwig
2026-07-08 9:57 ` John Garry
2026-07-08 11:26 ` John Garry
2026-07-08 16:18 ` Christoph Hellwig [this message]
2026-07-09 7:33 ` John Garry
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=20260708161846.GA2262@lst.de \
--to=hch@lst.de \
--cc=axboe@fb.com \
--cc=john.g.garry@oracle.com \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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