From: Bart Van Assche <bvanassche@acm.org>
To: Jack Wang <jinpu.wang@profitbricks.com>
Cc: Joe Lawrence <jdl1291@gmail.com>, Tejun Heo <tj@kernel.org>,
Chanho Min <chanho.min@lge.com>,
David Milburn <dmilburn@redhat.com>,
Hannes Reinecke <hare@suse.de>,
Mike Christie <michaelc@cs.wisc.edu>,
linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished
Date: Mon, 24 Jun 2013 12:53:34 +0200 [thread overview]
Message-ID: <51C8252E.3090007@acm.org> (raw)
In-Reply-To: <51C81CBD.5070709@profitbricks.com>
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.
next prev parent reply other threads:[~2013-06-24 10:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-06-12 12:48 [PATCH v11 0/9] More device removal fixes Bart Van Assche
2013-06-12 12:55 ` [PATCH v11 6/9] Make scsi_remove_host() wait until error handling finished Bart Van Assche
2013-06-24 1:15 ` Mike Christie
2013-06-24 6:49 ` Bart Van Assche
2013-06-24 19:19 ` James Bottomley
2013-06-24 20:04 ` Mike Christie
2013-06-24 22:27 ` James Bottomley
2013-06-25 2:26 ` Mike Christie
2013-06-25 2:56 ` Michael Christie
2013-06-25 9:01 ` Bart Van Assche
2013-06-25 13:45 ` James Bottomley
2013-06-25 15:31 ` Bart Van Assche
2013-06-25 16:13 ` Michael Christie
2013-06-25 17:40 ` James Bottomley
2013-06-25 17:47 ` Bart Van Assche
2014-01-30 19:46 ` Bart Van Assche
2014-01-31 5:58 ` James Bottomley
2014-01-31 7:52 ` Bart Van Assche
2013-06-25 11:13 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51C8252E.3090007@acm.org \
--to=bvanassche@acm.org \
--cc=chanho.min@lge.com \
--cc=dmilburn@redhat.com \
--cc=hare@suse.de \
--cc=jdl1291@gmail.com \
--cc=jinpu.wang@profitbricks.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).