[SCSI] libata, libsas: introduce sched_eh and end_eh port ops
When managing shost->host_eh_scheduled libata assumes that there is a 1:1 shost-to-ata_port relationship. libsas creates a 1:N relationship so it needs to manage host_eh_scheduled cumulatively at the host level. The sched_eh and end_eh port port ops allow libsas to track when domain devices enter/leave the "eh-pending" state under ha->lock (previously named ha->state_lock, but it is no longer just a lock for ha->state changes). Since host_eh_scheduled indicates eh without backing commands pinning the device it can be deallocated at any time. Move the taking of the domain_device reference under the port_lock to guarantee that the ata_port stays around for the duration of eh. Reviewed-by:Jacek Danecki <jacek.danecki@intel.com> Acked-by:
Jeff Garzik <jgarzik@redhat.com> Signed-off-by:
Dan Williams <dan.j.williams@intel.com> Signed-off-by:
James Bottomley <JBottomley@Parallels.com>
Showing
- drivers/ata/libata-core.c 4 additions, 0 deletionsdrivers/ata/libata-core.c
- drivers/ata/libata-eh.c 46 additions, 11 deletionsdrivers/ata/libata-eh.c
- drivers/scsi/libsas/sas_ata.c 34 additions, 4 deletionsdrivers/scsi/libsas/sas_ata.c
- drivers/scsi/libsas/sas_discover.c 4 additions, 2 deletionsdrivers/scsi/libsas/sas_discover.c
- drivers/scsi/libsas/sas_event.c 6 additions, 6 deletionsdrivers/scsi/libsas/sas_event.c
- drivers/scsi/libsas/sas_init.c 7 additions, 7 deletionsdrivers/scsi/libsas/sas_init.c
- drivers/scsi/libsas/sas_scsi_host.c 21 additions, 6 deletionsdrivers/scsi/libsas/sas_scsi_host.c
- include/linux/libata.h 4 additions, 0 deletionsinclude/linux/libata.h
- include/scsi/libsas.h 3 additions, 1 deletioninclude/scsi/libsas.h
- include/scsi/sas_ata.h 5 additions, 0 deletionsinclude/scsi/sas_ata.h
Loading
Please register or sign in to comment