Re: [Lsf-pc] [LSF/MM TOPIC] Unifying the LIO and SCST target drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2015-03-06 at 08:25 +0100, Bart Van Assche wrote:
> On 03/05/15 19:39, Andy Grover wrote:
> > On 03/05/2015 08:06 AM, Bart Van Assche wrote:
> >> If we would do what Nic proposed - modify SCST such that it uses
> >> configfs instead of sysfs - then that would result in the removal of at
> >> least one SCST feature that is important to its users, namely automatic
> >> population of the configuration filesystem with hardware target port
> >> information. Apparently Nic does not want to convert LIO from configfs
> >> to sysfs.
> > 
> > Clearly configfs is here to stay, but is there anything that says LIO 
> > couldn't have both? Besides the issue at hand, there are some other bits 
> > of useful info in LIO that aren't available because of configfs' 
> > limitations, but that would be possible via sysfs.
> 
> (resending my reply since apparently my previous e-mail didn't make it
> to the lists)
> 
> Hello Andy,
> 
> Let's have a look at FC HBAs. Most FC HBAs have a PCIe connector and
> support NPIV. If an NPIV WWN is configured then that WWN is passed from
> user space to the kernel. The PCIe specification supports hot-plugging.
> Although I'm not sure there exist FC HBAs that support hot-plugging,
> upon hot removal of a PCIe HBA the kernel is notified of this and must
> remove all NPIV WWNs from the filesystem that is used to configure the
> SCSI target subsystem. Since it is not allowed to remove configfs
> directories from inside the kernel I think NPIV is an example of a use
> case that cannot be handled properly when using configfs for configuring
> a SCSI target subsystem, even when combined in some way with sysfs.

Not exactly.  configfs in this context works similar to hotplug remove
of a FC HBA in initiator mode (or a USB drive even) with a mounted
filesystem on one of the LUNs.

That is, a kobject reference is obtained on Scsi_Host->shost_gendev at
/sys/kernel/config/target/qla2xxx_npiv/$NPIV_WWPN/ creation time,
preventing the final device_release() from being called until the last
reference is dropped via rmdir ../target/qla2xxx_npiv/$NPIV_WWPN/.

The practical method is to use a udev script called at hotplug remove
time (similar to USB) to drop the NPIV configfs groups associated with
device(s) being removed, allowing the underlying kernel data structures
to be released.

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux