From: Jeff Moyer <jmoyer@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: axboe@kernel.dk, JBottomley@parallels.com,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
Ewan Milne <emilne@redhat.com>
Subject: Re: [patch|rfc] block: fix race between request completion and timeout handling
Date: Wed, 28 Aug 2013 08:58:41 -0400 [thread overview]
Message-ID: <x49sixuynsu.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <521DA913.1010505@suse.de> (Hannes Reinecke's message of "Wed, 28 Aug 2013 09:38:59 +0200")
Hannes Reinecke <hare@suse.de> writes:
>> So, looked into things a bit more.
>> It looks as if you're on the right track, although I doubt your
>> patch will fix the issue for me :-(
>>
>> Thing is, you're right there is a race window between requeuing
>> and softirq triggering, which could well be fixed by your patch.
>> So for that reason alone I would like to take it.
>>
>> However, including your patch will end up opening another can of
>> worms: the softirq might now be triggering _while the request is
>> queued on the request queue_.
>> blk_requeue_request will be putting the request back on the request
>> queue, where it'll be stuck until being pulled off from
>> scsi_request_fn().
>> So if the softirq triggers during that condition we'll end up
>> calling the BUG_ON((!list_empty(&req->queuelist)) in
>> __blk_put_request().
>>
>> Guess we'd need to fix that one, too ...
>>
> Ah. Now I see it.
>
> We're requeuing from the softirq context, ie after the completion
> has triggered. So the above scenario can't actually happen and the
> patch is valid.
Do you still think it won't solve the issue you're seeing? What issue
is that, btw?
>
> So:
>
> Acked-by: Hannes Reinecke <hare@suse.de>
Thanks, I guess I'll have to send a properly signed-off patch, now. ;-)
Cheers,
Jeff
prev parent reply other threads:[~2013-08-28 12:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 14:28 Jeff Moyer
2013-08-27 14:49 ` Hannes Reinecke
2013-08-28 7:04 ` Hannes Reinecke
2013-08-28 7:38 ` Hannes Reinecke
2013-08-28 12:58 ` Jeff Moyer [this message]
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=x49sixuynsu.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=JBottomley@parallels.com \
--cc=axboe@kernel.dk \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.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
all inboxes | Powered by JetHome®