diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-11-28 19:29:20 (GMT) |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 20:06:08 (GMT) |
commit | 9095a64a9aead653df320e3a6fc70835c15d46e4 (patch) | |
tree | 63ad804f78668bf28d90ea2f8c9640ce92dacdea /include/scsi/sas_ata.h | |
parent | a3a142524aa4b1539a64a55087bf12ffa4b1f94e (diff) | |
download | linux-9095a64a9aead653df320e3a6fc70835c15d46e4.tar.xz |
[SCSI] libsas: fix timeout vs completion race
Until we have told the lldd to forget a task a timed out operation can
return from the hardware at any time. Since completion frees the task
we need to make sure that no tasks run their normal completion handler
once eh has decided to manage the task. Similar to
ata_scsi_cmd_error_handler() freeze completions to let eh judge the
outcome of the race.
Task collector mode is problematic because it presents a situation where
a task can be timed out and aborted before the lldd has even seen it.
For this case we need to guarantee that a task that an lldd has been
told to forget does not get queued after the lldd says "never seen it".
With sas_scsi_timed_out we achieve this with the ->task_queue_flush
mutex, rather than adding more time.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/sas_ata.h')
-rw-r--r-- | include/scsi/sas_ata.h | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index 557fc9a8..9f7a23d 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h @@ -41,8 +41,6 @@ int sas_ata_init_host_and_port(struct domain_device *found_dev, void sas_ata_task_abort(struct sas_task *task); void sas_ata_strategy_handler(struct Scsi_Host *shost); -int sas_ata_timed_out(struct scsi_cmnd *cmd, struct sas_task *task, - enum blk_eh_timer_return *rtn); int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, struct list_head *done_q); void sas_probe_sata(struct work_struct *work); @@ -67,12 +65,6 @@ static inline void sas_ata_strategy_handler(struct Scsi_Host *shost) { } -static inline int sas_ata_timed_out(struct scsi_cmnd *cmd, - struct sas_task *task, - enum blk_eh_timer_return *rtn) -{ - return 0; -} static inline int sas_ata_eh(struct Scsi_Host *shost, struct list_head *work_q, struct list_head *done_q) { |