* RE:[PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished
@ 2013-06-24 10:17 Jack Wang
2013-06-24 10:53 ` [PATCH " Bart Van Assche
0 siblings, 1 reply; 2+ messages in thread
From: Jack Wang @ 2013-06-24 10:17 UTC (permalink / raw)
To: Bart Van Assche
Cc: Joe Lawrence, Tejun Heo, Chanho Min, David Milburn,
Hannes Reinecke, Mike Christie, linux-scsi
> @@ -646,14 +703,20 @@ static int scsi_try_target_reset(struct scsi_cmnd *scmd)
> static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd)
> {
> int rtn;
> - struct scsi_host_template *hostt = scmd->device->host->hostt;
> + struct Scsi_Host *host = scmd->device->host;
> + struct scsi_host_template *hostt = host->hostt;
>
> if (!hostt->eh_device_reset_handler)
> return FAILED;
>
> + if (scsi_begin_eh(host))
> + return FAST_IO_FAIL;
> +
> rtn = hostt->eh_device_reset_handler(scmd);
> if (rtn == SUCCESS)
> __scsi_report_device_reset(scmd->device, NULL);
> + scsi_end_eh(host);
> +
> return rtn;
> }
As the new eh from Hannes haven't make it into mainline, maybe we still
need also check scsi_try_to_abort_cmd?
Jack
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished
2013-06-24 10:17 RE:[PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished Jack Wang
@ 2013-06-24 10:53 ` Bart Van Assche
0 siblings, 0 replies; 2+ messages in thread
From: Bart Van Assche @ 2013-06-24 10:53 UTC (permalink / raw)
To: Jack Wang
Cc: Joe Lawrence, Tejun Heo, Chanho Min, David Milburn,
Hannes Reinecke, Mike Christie, linux-scsi
On 06/24/13 12:17, Jack Wang wrote:
>> @@ -646,14 +703,20 @@ static int scsi_try_target_reset(struct scsi_cmnd *scmd)
>> static int scsi_try_bus_device_reset(struct scsi_cmnd *scmd)
>> {
>> int rtn;
>> - struct scsi_host_template *hostt = scmd->device->host->hostt;
>> + struct Scsi_Host *host = scmd->device->host;
>> + struct scsi_host_template *hostt = host->hostt;
>>
>> if (!hostt->eh_device_reset_handler)
>> return FAILED;
>>
>> + if (scsi_begin_eh(host))
>> + return FAST_IO_FAIL;
>> +
>> rtn = hostt->eh_device_reset_handler(scmd);
>> if (rtn == SUCCESS)
>> __scsi_report_device_reset(scmd->device, NULL);
>> + scsi_end_eh(host);
>> +
>> return rtn;
>> }
>
> As the new eh from Hannes haven't make it into mainline, maybe we still
> need also check scsi_try_to_abort_cmd?
I don't think such checks are necessary in scsi_try_to_abort_cmd().
scsi_remove_host() already waits until outstanding SCSI commands have
finished. scsi_try_to_abort_cmd() only gets invoked if there are still
one or more unfinished commands so scsi_try_to_abort_cmd() won't be
invoked anymore after scsi_remove_host() has finished.
Bart.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-24 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 10:17 RE:[PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished Jack Wang
2013-06-24 10:53 ` [PATCH " Bart Van Assche
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.