Re: [PATCH V5 02/17] scsi: sysfs: don't add scsi_device if its already added

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

 



On Wed, Sep 24, 2014 at 09:27:47AM -0700, Subhash Jadavani wrote:
> No, It happens in this sequence of events:
> 1. LLD calls the __scsi_add_device() for well known logical units before
> scsi_scan_host() (This is done as part of [PATCH V5 10/17] scsi: ufs:
> manually add well known logical units). __scsi_add_device() will also add
> the scsi device to sysfs by calling scsi_sysfs_add_sdev()
> 2. Now LDD calls the scsi_scan_host() (Note that CONFIG_SCSI_SCAN_ASYNC is
> enabled) which will schedule the async scan. Device reports only normal LUs
> (no w-lus reported here) when REPORT LUNs in sent with SELECT REPORT
> cleared. At the end of async scan, scsi_finish_async_scan() calls
> scsi_sysfs_add_devices(). scsi_sysfs_add_devices() iterates through all the
> scsi_device instances attached to Scsi_Host hence end up calling
> scsi_sysfs_add_sdev() 2nd time for the scsi_device which were already added
> explicitly by LDD.

Ok.  Can you move the is_visible check to scsi_sysfs_add_devices,
should be fine to place it just after the sdev_state check.

--
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