[PATCH] nvme: add nvme_is_disc_subsys() helper

Martin George martinus.gpy at gmail.com
Wed Oct 28 08:34:03 PDT 2026


On Wed, 2026-10-28 at 15:58 +0100, Christoph Hellwig wrote:
> On Thu, Oct 22, 2026 at 01:01:44PM +0530, Martin George wrote:
> > Mirror the target's nvmet_is_disc_subsys() with a host-side
> > nvme_is_disc_subsys() helper, and use it for the open-coded
> > subtype == NVME_NQN_DISC checks in the host code to help
> > maintain consistency and improve code readability.
> > 
> > And while here, fix an error message to refer to the subsystem
> > rather than the controller.
> 
> Not going to NAK it, but the helper feels a bit pointless to me.
> Do you have any bigger plans with it?
> 

No bigger plans - it's just a small cleanup. Mainly two things:

- Consistency with the target, which already has something similar
- It folds the open-coded discovery subtype checks into one self-
documenting helper for current & future use.

So a minor net improvement rather than a prerequisite for anything.

-Martin



More information about the Linux-nvme mailing list