Subject: Re: [RFC PATCH 2/9] iscsi: associate endpoints with a host

From: Chris Leech <[email-masked]>
Date: Tue, 11 Apr 2023 19:31:25 -0700

On Tue, Mar 14, 2023 at 05:23:26PM +0100, Hannes Reinecke wrote:
> On 2/8/23 18:40, Lee Duncan wrote:
> > From: Lee Duncan <[email-masked]>
> > @@ -230,6 +230,7 @@ iscsi_create_endpoint(int dd_size)
> >   	ep->id = id;
> >   	ep->dev.class = &iscsi_endpoint_class;
> > +	ep->dev.parent = &shost->shost_gendev;
> >   	dev_set_name(&ep->dev, "ep-%d", id);
> >   	err = device_register(&ep->dev);
> >           if (err)
> 
> Umm... doesn't this change the sysfs layout?
> IE won't the endpoint node be moved under the Scsi_Host directory?
> 
> But even if it does: do we care?

It does, but it shouldn't matter. The Open-iSCSI tools look under the
subsystem, not the device path. Being a child of the host makes more
sense then being a floating virtual device.

I just re-tested with bnx2i to make sure moving an endpoint devpath in
sysfs didn't break anything.

- Chris