aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2009-11-11 17:34:34 -0500
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 13:01:37 -0500
commitfdd46dcbe4468a1f47a2cc9be442d11c3d21dd68 (patch)
treea8404ea68065de3bd3b26b159db3650d463e23ab /drivers/scsi
parent3fe5ae8b4c4d3a82c755074878da7ddb9dde381e (diff)
[SCSI] iscsi class: modify handling of replacement timeout
This patch modifies the replacement/recovery_timeout so it works more like the fc fast io fail tmo. If userspace tries to set the replacement/recovery_timeout to less than zero, we will turn off the forced recovery cleanup. If userspace sets the value to 0 then we will force the recovery cleanup immediately. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/scsi_transport_iscsi.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c
index dc04ca124a69..ea3892e7e0f7 100644
--- a/drivers/scsi/scsi_transport_iscsi.c
+++ b/drivers/scsi/scsi_transport_iscsi.c
@@ -627,8 +627,10 @@ static void __iscsi_block_session(struct work_struct *work)
627 spin_unlock_irqrestore(&session->lock, flags); 627 spin_unlock_irqrestore(&session->lock, flags);
628 scsi_target_block(&session->dev); 628 scsi_target_block(&session->dev);
629 ISCSI_DBG_TRANS_SESSION(session, "Completed SCSI target blocking\n"); 629 ISCSI_DBG_TRANS_SESSION(session, "Completed SCSI target blocking\n");
630 queue_delayed_work(iscsi_eh_timer_workq, &session->recovery_work, 630 if (session->recovery_tmo >= 0)
631 session->recovery_tmo * HZ); 631 queue_delayed_work(iscsi_eh_timer_workq,
632 &session->recovery_work,
633 session->recovery_tmo * HZ);
632} 634}
633 635
634void iscsi_block_session(struct iscsi_cls_session *session) 636void iscsi_block_session(struct iscsi_cls_session *session)
@@ -1348,8 +1350,7 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
1348 switch (ev->u.set_param.param) { 1350 switch (ev->u.set_param.param) {
1349 case ISCSI_PARAM_SESS_RECOVERY_TMO: 1351 case ISCSI_PARAM_SESS_RECOVERY_TMO:
1350 sscanf(data, "%d", &value); 1352 sscanf(data, "%d", &value);
1351 if (value != 0) 1353 session->recovery_tmo = value;
1352 session->recovery_tmo = value;
1353 break; 1354 break;
1354 default: 1355 default:
1355 err = transport->set_param(conn, ev->u.set_param.param, 1356 err = transport->set_param(conn, ev->u.set_param.param,