mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[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>
This commit is contained in:
parent
3fe5ae8b4c
commit
fdd46dcbe4
1 changed files with 5 additions and 4 deletions
|
@ -627,7 +627,9 @@ static void __iscsi_block_session(struct work_struct *work)
|
|||
spin_unlock_irqrestore(&session->lock, flags);
|
||||
scsi_target_block(&session->dev);
|
||||
ISCSI_DBG_TRANS_SESSION(session, "Completed SCSI target blocking\n");
|
||||
queue_delayed_work(iscsi_eh_timer_workq, &session->recovery_work,
|
||||
if (session->recovery_tmo >= 0)
|
||||
queue_delayed_work(iscsi_eh_timer_workq,
|
||||
&session->recovery_work,
|
||||
session->recovery_tmo * HZ);
|
||||
}
|
||||
|
||||
|
@ -1348,7 +1350,6 @@ iscsi_set_param(struct iscsi_transport *transport, struct iscsi_uevent *ev)
|
|||
switch (ev->u.set_param.param) {
|
||||
case ISCSI_PARAM_SESS_RECOVERY_TMO:
|
||||
sscanf(data, "%d", &value);
|
||||
if (value != 0)
|
||||
session->recovery_tmo = value;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue