aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-07-16 01:29:41 -0400
committerJeff Garzik <jeff@garzik.org>2007-07-20 08:26:26 -0400
commit5ddf24c5ea9d715dc4f5d5d5dd1c9337d90466dc (patch)
tree6ba89094decfada468fba1f4670b9395c6f66e42 /include/linux/libata.h
parent4e57c517b3cbaceb7438eeec879ca129fc17442c (diff)
libata: implement EH fast drain
In most cases, when EH is scheduled, all in-flight commands are aborted causing EH to kick in immediately. However, in some cases (especially with PMP), it's unclear which commands are affected by the error condition and although aborting all in-flight commands work, it isn't optimal and may cause unnecessary disruption. On the other hand, waiting for in-flight commands to drain themselves can take up to 30seconds. This patch implements EH fast drain to handle such situations. It gives in-flight commands some time to finish up but doesn't wait for too long. After EH is scheduled, fast drain timer is started and if no other completion occurs in ATA_EH_FASTDRAIN_INTERVAL all in-flight commands are aborted. If any completion occurred in the interval, the port is given another interval to finish up itself. Currently ATA_EH_FASTDRAIN_INTERVAL is 3 secs which should be enough for finishing up most commands. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r--include/linux/libata.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 74800ad6d81f..be5a43928c84 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -565,6 +565,9 @@ struct ata_port {
565 pm_message_t pm_mesg; 565 pm_message_t pm_mesg;
566 int *pm_result; 566 int *pm_result;
567 567
568 struct timer_list fastdrain_timer;
569 unsigned long fastdrain_cnt;
570
568 void *private_data; 571 void *private_data;
569 572
570#ifdef CONFIG_ATA_ACPI 573#ifdef CONFIG_ATA_ACPI