• T
    [PATCH] libata-hp-prep: store attached SCSI device · 3edebac4
    Tejun Heo 提交于
    Add device persistent field dev->sdev and store the attached SCSI
    device.  With hotplug, libata needs to know the attached SCSI device
    to offline and detach it, but scsi_device_lookup() cannot be used
    because libata will reuse SCSI ID numbers - dead but not gone devices
    (due to zombie opens, etc...) interfere with the lookup.
    
    dev->sdev doesn't hold reference to the SCSI device.  It's cleared
    when the SCSI device goes away.
    Signed-off-by: NTejun Heo <htejun@gmail.com>
    3edebac4
libata.h 33.6 KB