From: "jianchao.wang" <jianchao.w.wang@oracle.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
James Bottomley <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-block <linux-block@vger.kernel.org>,
Linux SCSI List <linux-scsi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] block: export __blk_complete_request
Date: Fri, 15 Jun 2018 10:44:38 +0800 [thread overview]
Message-ID: <e5344293-b0b7-d2e0-f2e7-c0700efdfbe4@oracle.com> (raw)
In-Reply-To: <3dd3f82a-5b68-f039-3a8a-7c5fe4e24c3e@oracle.com>
On 06/15/2018 10:22 AM, jianchao.wang wrote:
> Hi Ming
>
> On 06/15/2018 10:17 AM, Ming Lei wrote:
>> On Fri, Jun 15, 2018 at 9:57 AM, Jianchao Wang
>> <jianchao.w.wang@oracle.com> wrote:
>>> After f6e7d48 (block: remove BLK_EH_HANDLED), LLDD is responsible
>>> to complete the timed out request, however, for blk-legacy, the
>>> 'complete' is still marked, blk_complete_request will do nothing,
>>> we export __blk_complete_request for LLDD to complete the request
>>> in timeout path.
>>>
>>> Signed-off-by: Jianchao Wang <jianchao.w.wang@oracle.com>
>>> ---
>>> block/blk-softirq.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/block/blk-softirq.c b/block/blk-softirq.c
>>> index 01e2b35..15c1f5e 100644
>>> --- a/block/blk-softirq.c
>>> +++ b/block/blk-softirq.c
>>> @@ -144,6 +144,7 @@ void __blk_complete_request(struct request *req)
>>>
>>> local_irq_restore(flags);
>>> }
>>> +EXPORT_SYMBOL(__blk_complete_request);
>>>
>>> /**
>>> * blk_complete_request - end I/O on a request
>>> --
>>> 2.7.4
>>>
>>
>> Looks non-blk-mq timeout code need to convert to ref-counter
>> based approach too?
>
> IMO, ref-counter is just to fix the blk-mq req life recycle issue.
> It cannot replace the blk_mark_rq_complete which could avoid the race between
> timeout and io completion path.
The .timeout return BLK_EH_DONE doesn't always mean the request has been completed.
Such as scsi-mid layer, its .timeout callback return BLK_EH_DONE but the timed out
request is still in abort or eh process. What if a completion irq come during that ?
> Or maybe my understanding is wrong ...
>
> Thanks
> Jianchao
>>
>
next prev parent reply other threads:[~2018-06-15 2:44 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-15 1:57 Jianchao Wang
2018-06-15 1:57 ` [PATCH 2/2] scsi_transport_fc: use __blk_complete_request in fc_bsg_job_timeout Jianchao Wang
2018-06-15 2:17 ` [PATCH 1/2] block: export __blk_complete_request Ming Lei
2018-06-15 2:22 ` jianchao.wang
2018-06-15 2:44 ` jianchao.wang [this message]
2018-06-15 2:56 ` Ming Lei
2018-06-15 3:04 ` jianchao.wang
2018-06-15 3:20 ` Ming Lei
2018-06-15 3:26 ` jianchao.wang
2018-06-15 4:03 ` Ming Lei
2018-06-15 5:10 ` jianchao.wang
2018-06-15 11:58 ` Christoph Hellwig
2018-06-15 2:49 ` Ming Lei
2018-06-19 14:09 ` Christoph Hellwig
2018-06-19 14:52 ` jianchao.wang
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=e5344293-b0b7-d2e0-f2e7-c0700efdfbe4@oracle.com \
--to=jianchao.w.wang@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tom.leiming@gmail.com \
/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
all inboxes | Powered by JetHome®