Re: [PATCH 2.6.23.14] SCSI : scsi_device_lookup/scsi_device_lookup_by_target return NULL for an existent scsi_device

2008-01-30 Thread James Smart
Nagendra Tomar wrote: Hello James, My understanding is that the scsi_device in SDEV_DEL state is there in the scsi_host-devices/scsi_target-devices queue, just because there is some outstanding command holding a reference to it. Well, there's a lot more reasons than just an

Re: [PATCH 2.6.23.14] SCSI : scsi_device_lookup/scsi_device_lookup_by_target return NULL for an existent scsi_device

2008-01-28 Thread Nagendra Tomar
James, I am facing issues with device removal being done when there are commands outstanding in the LLD. As explained in my original post, its resulting in effects ranging from the duplicate kobject warnings to the inability of the scsi subsystem to find a valid device (all symptoms are

[PATCH 2.6.23.14] SCSI : scsi_device_lookup/scsi_device_lookup_by_target return NULL for an existent scsi_device

2008-01-23 Thread Nagendra Tomar
__scsi_device_lookup and __scsi_device_lookup_by_target do not check for the sdev_state and hence return scsi_devices with sdev_state set to SDEV_DEL also. It has the following side effects. We can have two scsi_devices with the same HBTL queued in the scsi_host-__devices/scsi_target-devices

Re: [PATCH 2.6.23.14] SCSI : scsi_device_lookup/scsi_device_lookup_by_target return NULL for an existent scsi_device

2008-01-23 Thread James Smart
This sounds like a return to the old behavior, where sdevs in SDEV_DEL were ignored. However, it too had lots of bad effects. We'd have to go back to the threads over the last 2 years that justified resurrecting the sdev. Start looking at threads like :