nvme-fc: use pci device as parent for nvme controller
Subsystems (2)
PATCH 1/1 nvme-fc: use pci device as parent for nvme controller
To allow system tools to figure out which pci device provides a given NVMe controller this patch moves the nvme controller sysfs entry as a child of the PCI device.
With this tools like dracut can traverse the device hierarchy to figure out which modules to include.
--- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/fc.c +1 -1
@@ -3117,7 +3117,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,* Defer this to the connect path. */ - ret =nvme_init_ctrl (&ctrl->ctrl, dev, &nvme_fc_ctrl_ops,0 ); + ret =nvme_init_ctrl (&ctrl->ctrl, ctrl->dev, &nvme_fc_ctrl_ops,0 );if (ret) goto out_cleanup_admin_q;
Signature · 1 line
2.16.4
Christoph Hellwig
maintainerPATCH 1/1 nvme-fc: use pci device as parent for nvme controller
Quoted 6 lines · Hannes Reinecke
To allow system tools to figure out which pci device provides a given NVMe controller this patch moves the nvme controller sysfs entry as a child of the PCI device.
With this tools like dracut can traverse the device hierarchy to figure out which modules to include.
Doesn't ->create_ctrl consumer the reference to the passed in device, or in other words you create a leak on the fabrics device here?
PATCH 1/1 nvme-fc: use pci device as parent for nvme controller
In reply to Hannes ReineckeQuoted 17 lines · Hannes Reinecke
To allow system tools to figure out which pci device provides a given NVMe controller this patch moves the nvme controller sysfs entry as a child of the PCI device.
With this tools like dracut can traverse the device hierarchy to figure out which modules to include.
Signed-off-by Hannes Reinecke <hare at suse.com>--- drivers/nvme/host/fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/nvme/host/fc.c +0
-0
drivers/nvme/host/fc.c nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · line 3123
Quoted 8 lines
drivers/nvme/host/fc.c +1
-1@@ -3117,7 +3117,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,* Defer this to the connect path. */ - ret =nvme_init_ctrl (&ctrl->ctrl, dev, &nvme_fc_ctrl_ops,0 ); + ret =nvme_init_ctrl (&ctrl->ctrl, ctrl->dev, &nvme_fc_ctrl_ops,0 );if (ret) goto out_cleanup_admin_q;
So how do you solve this with rdma and tcp ??? I'm not sure I like deviating from them.? Did it pick up the fc-nvme and fabric modules too ?
I think this is one more reason the FC transport needs to be pulled out of scsi and layered under the pci device, then shared by scsi and nvme.
-- james
PATCH 1/1 nvme-fc: use pci device as parent for nvme controller
In reply to Christoph HellwigQuoted 11 lines · Christoph Hellwig
Quoted 6 lines · Hannes Reinecke
To allow system tools to figure out which pci device provides a given NVMe controller this patch moves the nvme controller sysfs entry as a child of the PCI device.
With this tools like dracut can traverse the device hierarchy to figure out which modules to include.
Doesn't ->create_ctrl consumer the reference to the passed in device, or in other words you create a leak on the fabrics device here?
Hmm. Have to check.
Cheers,
Hannes
Signature · 5 lines
Dr. Hannes Reinecke Teamlead Storage & Networking hare at suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG N?rnberg)
Christoph Hellwig
maintainerPATCH 1/1 nvme-fc: use pci device as parent for nvme controller
In reply to James SmartQuoted 7 lines · James Smart
Quoted 7 lines
drivers/nvme/host/fc.c +0
-0@@ -3117,7 +3117,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,* Defer this to the connect path. */
Quoted 8 lines
drivers/nvme/host/fc.c nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, · line 3123
Quoted 5 lines
drivers/nvme/host/fc.c +1
-0- ret =nvme_init_ctrl (&ctrl->ctrl, dev, &nvme_fc_ctrl_ops,0 ); + ret =nvme_init_ctrl (&ctrl->ctrl, ctrl->dev, &nvme_fc_ctrl_ops,0 );if (ret) goto out_cleanup_admin_q;So how do you solve this with rdma and tcp ??? I'm not sure I like deviating from them.? Did it pick up the fc-nvme and fabric modules too ?
All fabrics drivers currently use the passed in 'fake' fabrics device.