Some arrays may only capable of handling one STPG at a time, so this patch implements a module option 'sync_stpg' to have STPGs submitted synchronously. Signed-off-by: Hannes Reinecke <hare@xxxxxxx> --- drivers/scsi/device_handler/scsi_dh_alua.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 6fcdcd5..525449f 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -73,6 +73,10 @@ static uint optimize_stpg; module_param(optimize_stpg, uint, S_IRUGO|S_IWUSR); MODULE_PARM_DESC(optimize_stpg, "Allow use of a non-optimized path, rather than sending a STPG, when implicit TPGS is supported (0=No,1=Yes). Default is 0."); +static uint sync_stpg; +module_param(sync_stpg, uint, S_IRUGO); +MODULE_PARM_DESC(sync_stpg, "Issue STPG synchronously (0=No,1=Yes). Default is 0."); + static LIST_HEAD(port_group_list); static DEFINE_SPINLOCK(port_group_lock); static struct workqueue_struct *kaluad_wq; @@ -1019,9 +1023,11 @@ static struct scsi_device_handler alua_dh = { static int __init alua_init(void) { - int r; + int r, max_active = 0; - kaluad_wq = alloc_workqueue("kaluad", WQ_MEM_RECLAIM, 0); + if (sync_stpg) + max_active = 1; + kaluad_wq = alloc_workqueue("kaluad", WQ_MEM_RECLAIM, max_active); if (!kaluad_wq) { /* Temporary failure, bypass */ return SCSI_DH_DEV_TEMP_BUSY; -- 1.8.5.6 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html