[PATCH V3] nvme: introduce nvme_disk_is_ns_head helper

Keith Busch kbusch at kernel.org
Wed Jan 3 08:18:50 PST 2024


On Tue, Jan 02, 2024 at 02:05:13PM -0700, Keith Busch wrote:
> On Wed, Dec 27, 2023 at 05:31:06PM +0800, Guixin Liu wrote:
> > We currently rely on gendisk's file operations (fops) to distinguish
> > between a namespace head (ns_head) and a regular namespace. To enhance
> > code readability, introduce a helper function.
> > Additionally, we must ensure that the device is not an ns_head before
> > calling nvme_get_ns_from_dev(). To enforce this, add a WARN_ON check
> > within the nvme_get_ns_from_dev().
> 
> Thanks, applied to nvme-6.8 with Christoph's suggestion folded in.

Patch updated to include fix for build breakage:

  https://lists.infradead.org/pipermail/linux-nvme/2024-January/044120.html

Final form is currently here if you want to double check what I did:

  https://git.infradead.org/nvme.git/commitdiff/620a6a938a716c6bd10129ec265731d5cb098a27



More information about the Linux-nvme mailing list