aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2012-07-09 22:33:25 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 04:05:54 -0400
commit2955b47d2c1983998a8c5915cb96884e67f7cb53 (patch)
treee21ace685c01c698f20b7cb81b0097519c2fa18c /drivers/scsi
parent529f9a765509c2c141ecfee0c54e17bf9a6b8bc1 (diff)
[SCSI] async: introduce 'async_domain' type
This is in preparation for teaching async_synchronize_full() to sync all pending async work, and not just on the async_running domain. This conversion is functionally equivalent, just embedding the existing list in a new async_domain type. The .registered attribute is used in a later patch to distinguish between domains that want to be flushed by async_synchronize_full() versus those that only expect async_synchronize_{full|cookie}_domain to be used for flushing. [jejb: add async.h to scsi_priv.h for struct async_domain] Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libsas/sas_ata.c2
-rw-r--r--drivers/scsi/scsi.c3
-rw-r--r--drivers/scsi/scsi_priv.h3
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
index bec3bc8aab0c..a59fcdc8fd63 100644
--- a/drivers/scsi/libsas/sas_ata.c
+++ b/drivers/scsi/libsas/sas_ata.c
@@ -742,7 +742,7 @@ static void async_sas_ata_eh(void *data, async_cookie_t cookie)
742void sas_ata_strategy_handler(struct Scsi_Host *shost) 742void sas_ata_strategy_handler(struct Scsi_Host *shost)
743{ 743{
744 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost); 744 struct sas_ha_struct *sas_ha = SHOST_TO_SAS_HA(shost);
745 LIST_HEAD(async); 745 ASYNC_DOMAIN_EXCLUSIVE(async);
746 int i; 746 int i;
747 747
748 /* it's ok to defer revalidation events during ata eh, these 748 /* it's ok to defer revalidation events during ata eh, these
diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c
index bbbc9c918d4c..4cade886a50a 100644
--- a/drivers/scsi/scsi.c
+++ b/drivers/scsi/scsi.c
@@ -54,6 +54,7 @@
54#include <linux/notifier.h> 54#include <linux/notifier.h>
55#include <linux/cpu.h> 55#include <linux/cpu.h>
56#include <linux/mutex.h> 56#include <linux/mutex.h>
57#include <linux/async.h>
57 58
58#include <scsi/scsi.h> 59#include <scsi/scsi.h>
59#include <scsi/scsi_cmnd.h> 60#include <scsi/scsi_cmnd.h>
@@ -91,7 +92,7 @@ EXPORT_SYMBOL(scsi_logging_level);
91#endif 92#endif
92 93
93/* sd, scsi core and power management need to coordinate flushing async actions */ 94/* sd, scsi core and power management need to coordinate flushing async actions */
94LIST_HEAD(scsi_sd_probe_domain); 95ASYNC_DOMAIN(scsi_sd_probe_domain);
95EXPORT_SYMBOL(scsi_sd_probe_domain); 96EXPORT_SYMBOL(scsi_sd_probe_domain);
96 97
97/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI. 98/* NB: These are exposed through /proc/scsi/scsi and form part of the ABI.
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index 13d74da5dfab..8f9a0cadc296 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -2,6 +2,7 @@
2#define _SCSI_PRIV_H 2#define _SCSI_PRIV_H
3 3
4#include <linux/device.h> 4#include <linux/device.h>
5#include <linux/async.h>
5#include <scsi/scsi_device.h> 6#include <scsi/scsi_device.h>
6 7
7struct request_queue; 8struct request_queue;
@@ -163,7 +164,7 @@ static inline int scsi_autopm_get_host(struct Scsi_Host *h) { return 0; }
163static inline void scsi_autopm_put_host(struct Scsi_Host *h) {} 164static inline void scsi_autopm_put_host(struct Scsi_Host *h) {}
164#endif /* CONFIG_PM_RUNTIME */ 165#endif /* CONFIG_PM_RUNTIME */
165 166
166extern struct list_head scsi_sd_probe_domain; 167extern struct async_domain scsi_sd_probe_domain;
167 168
168/* 169/*
169 * internal scsi timeout functions: for use by mid-layer and transport 170 * internal scsi timeout functions: for use by mid-layer and transport