linux-stable/drivers/scsi/libsas
Jason Yan 0e4b1791d9 scsi: libsas: Abort all in-flight requests when device is gone
When a disk is removed with in-flight I/O, the application needs to wait
for 30 seconds (depending on the timeout configuration) to hear back from
the kernel. Xingui tried to fix this issue by aborting the ATA link for
SATA devices[1], however this approach left the SAS devices unresolved.

Try to fix this issue by aborting all in-flight requests when the device is
gone. This is implemented by iterating over the tagset.

[1] https://lore.kernel.org/lkml/234e04db-7539-07e4-a6b8-c6b05f78193d@opensource.wdc.com/T/

Cc: Xingui Yang <yangxingui@huawei.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Cc: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20230330110930.175539-1-yanaijie@huawei.com
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2023-04-02 21:19:12 -04:00
..
Kconfig scsi: libsas: Drop BLK_DEV_BSGLIB selection 2021-07-27 00:06:42 -04:00
Makefile scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_ata.c SCSI misc on 20230222 2023-02-22 13:41:41 -08:00
sas_discover.c scsi: libsas: Abort all in-flight requests when device is gone 2023-04-02 21:19:12 -04:00
sas_event.c scsi: libsas: Use bool for queue_work() return code 2022-02-27 21:48:30 -05:00
sas_expander.c scsi: libsas: Factor out sas_ex_add_dev() 2022-12-30 16:59:11 +00:00
sas_host_smp.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_init.c scsi: libsas: Make sas_{alloc, alloc_slow, free}_task() private 2022-10-18 02:37:45 +00:00
sas_internal.h scsi: libsas: Add smp_ata_check_ready_type() 2022-11-26 02:26:02 +00:00
sas_phy.c scsi: libsas: Allow libsas to include SCSI header files directly 2021-07-20 23:11:17 -04:00
sas_port.c scsi: libsas: Clean up sas_form_port() 2022-03-01 23:56:27 -05:00
sas_scsi_host.c ata: libata-sata: Fix device queue depth control 2022-09-28 20:47:31 +09:00
sas_task.c scsi: libsas: Use enum for response frame DATAPRES field 2022-02-19 15:59:34 -05:00