From: Bart Van Assche <bvanassche@acm.org>
To: Muthu Kumar <muthu.lkml@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>, Tejun Heo <tj@kernel.org>,
Jej B <James.Bottomley@hansenpartnership.com>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH UPDATED] block: In blk_execute_rq_nowait, init rq->end_io before checking for dead queue.
Date: Sat, 09 Jun 2012 12:47:24 +0000 [thread overview]
Message-ID: <4FD345DC.6020405@acm.org> (raw)
In-Reply-To: <CAFR8uecFzcrAYSy2ieJM5vWjNLSO3bjg20cy+B4cimHZ4RLktA@mail.gmail.com>
On 06/09/12 00:10, Muthu Kumar wrote:
> Since the queue->lock case is taken care of in the following patch:
>
> (http://www.spinics.net/lists/linux-scsi/msg59845.html [PATCH 1/4]
> block: Fix race on request_queue.end_io invocations)
>
> Updated the patch with just the end_io assignment before dead queue check.
>
>
> -------------
> blk-exec.c: In blk_execute_rq_nowait(), if the queue is dead, call to
> done() routine is not made. That will result in blk_execute_rq() stuck
> in wait_for_completion(). Avoid this by initializing rq->end_io to
> done() routine before we check for dead queue.
>
> Signed-off-by: Muthukumar Ratty <muthur@gmail.com>
> CC: Tejun Heo <tj@kernel.org>
> CC: Jens Axboe <axboe@kernel.dk>
> CC: James Bottomley <James.Bottomley@hansenpartnership.com>
>
> -------------
> diff --git a/block/blk-exec.c b/block/blk-exec.c
> index fb2cbd5..f8b00c7 100644
> --- a/block/blk-exec.c
> +++ b/block/blk-exec.c
> @@ -53,6 +53,9 @@ void blk_execute_rq_nowait(struct request_queue *q,
> struct gendisk *bd_disk,
> WARN_ON(irqs_disabled());
> spin_lock_irq(q->queue_lock);
>
> + rq->rq_disk = bd_disk;
> + rq->end_io = done;
> +
> if (unlikely(blk_queue_dead(q))) {
> spin_unlock_irq(q->queue_lock);
> rq->errors = -ENXIO;
> @@ -61,8 +64,6 @@ void blk_execute_rq_nowait(struct request_queue *q,
> struct gendisk *bd_disk,
> return;
> }
This patch does not apply since it's line-wrapped and a part is missing
in the second hunk. However, if I had overlooked your original patch
then I want to apologize.
If you can resend your original patch including the locking changes then
I'll test it further.
Bart.
next prev parent reply other threads:[~2012-06-09 17:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-09 0:10 [PATCH UPDATED] block: In blk_execute_rq_nowait, init rq->end_io before checking for dead queue Muthu Kumar
2012-06-09 12:47 ` Bart Van Assche [this message]
2012-06-09 23:57 ` Muthu Kumar
2012-06-10 17:40 ` Bart Van Assche
2012-06-11 17:33 ` Muthu Kumar
2012-06-11 21:23 ` Muthu Kumar
2012-06-18 22:42 ` Tejun Heo
2012-06-20 18:53 ` Bart Van Assche
2012-06-21 0:53 ` Muthu Kumar
2012-06-21 0:56 ` Tejun Heo
2012-06-21 5:40 ` Bart Van Assche
2012-06-21 21:40 ` Muthu Kumar
2012-06-22 7:20 ` Bart Van Assche
2012-06-22 18:05 ` Muthu Kumar
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=4FD345DC.6020405@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=muthu.lkml@gmail.com \
--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).