scsi: core: use eh_timeout to timeout start_unit command
PATCH 1/1 scsi: core: use eh_timeout to timeout start_unit command
From: Chunguang Xu <[email protected]>
In some abnormal scenarios, STU may timeout. The recovery time of 30 seconds is relatively long. Now we need to adjusting rq_timeout to adjust STU timeout value, but it will affect the actual IO.
ptach 9728c081(make scsi_eh_try_stu use block timeout) uses rq_timeout to timeout the STU command, but after pathc 0816c92( Allow error handling timeout to be specified) eh_timeout will init to SCSI_DEFAULT_EH_TIMEOUT, so it is more reasonable to use eh_timeout as the timeout value of STU command. In this way, we can uniformly control the recovery time through eh_timeout.
Signed-off-by Chunguang Xu <[email protected]>
--- drivers/scsi/scsi_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_error.c +1 -1
@@ -1404,7 +1404,7 @@ static int scsi_eh_try_stu(struct scsi_cmnd *scmd)enum scsi_disposition rtn =NEEDS_RETRY ;for (i =0 ; rtn ==NEEDS_RETRY && i <2 ; i++) - rtn =scsi_send_eh_cmnd (scmd, stu_command,6 , scmd->device->request_queue->rq_timeout,0 ); + rtn =scsi_send_eh_cmnd (scmd, stu_command,6 , scmd->device->eh_timeout,0 );if (rtn ==SUCCESS )return 0 ;
Signature · 1 line
1.8.3.1