Re: [PATCH v1 1/1] nvme: add admin controller support. prohibit ioq creation for admin & disco ctrlrs

From: Keith Busch
Date: Thu Apr 03 2025 - 14:59:58 EST


On Thu, Apr 03, 2025 at 06:49:01AM +0200, Christoph Hellwig wrote:
> On Mon, Mar 31, 2025 at 09:03:11AM -0600, Keith Busch wrote:
> > On Fri, Mar 28, 2025 at 02:36:40PM -0700, Kamaljit Singh wrote:
> > > -static inline bool nvme_discovery_ctrl(struct nvme_ctrl *ctrl)
> > > -{
> > > - return ctrl->opts && ctrl->opts->discovery_nqn;
> > > -}
> > > -
> >
> > I suppose it's fine to rename this function with an nvmf_ prefix, but
> > it's not really related to the rest of the patch and makes the diff
> > larger than necessary.
>
> It isn't, nvmf_ is really for code in the fabrics library and not used
> by core code.

Yes, I'm not suggesting to use "nvmf_" in the core. This function checks
for ctrl->ops, which only applies to fabrics, so this is a fabrics
specific function that could belong there instead of the core, is all
I'm saying. Not that I'd recommend making such a move in this patch...