libsas: question and suggested patch for hotplug issue in sas_discover.c

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

 



We have found an issue with hot plugging behind an expander - After we unplug a drive behind expander, the sas_unregister_dev function is called, it then calls sas_rphy_delete to notify the upper layer that the device is gone. 

However, this sas_rphy_delete is not returning for several minutes later after the I/O timeout process is exhausted. Once sas_rphy_delete returns, the sas_notify_lldd_dev_gone function is called to notify the lldd driver the device is gone.

The problem we have seen is that the device is not posted after several minutes of being unplugged and a then replugged.
 
The following change is in ../libsas/sas_discover.c file. By calling the sas_notify_lldd_dev_gone function before calling the sas_unregister_dev function we can resolve the hot plug drive behind expander issue.

--- linux-2.6.36-rc3/drivers/scsi/libsas/sas_discover.c.old	2010-09-09 06:54:05.096757412 -0700
+++ linux-2.6.36-rc3/drivers/scsi/libsas/sas_discover.c	2010-09-09 06:56:32.115230046 -0700
@@ -233,6 +233,7 @@
 {
 	if (dev->rphy) {
 		sas_remove_children(&dev->rphy->dev);
+		sas_notify_lldd_dev_gone(dev);
 		sas_rphy_delete(dev->rphy);
 		dev->rphy = NULL;
 	}

The above change is to call sas_notify_lldd_dev_gone before calling sas_rphy_delete which causes I/O's to abort instead of timeout, so the return from calling sas_rphy_delete is more like seconds instead of minutes.


Thanks, 
ed.ciechanowski@xxxxxxxxx

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