All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH block/for-linus] block: blk-throttle should be drained regardless of q->elevator
Date: Mon, 13 Feb 2012 18:27:42 -0500	[thread overview]
Message-ID: <20120213232742.GH3130@redhat.com> (raw)
In-Reply-To: <20120213225248.GH12117@google.com>

On Mon, Feb 13, 2012 at 02:52:48PM -0800, Tejun Heo wrote:
> Currently, blk_cleanup_queue() doesn't call elv_drain_elevator() if
> q->elevator doesn't exist; however, bio based drivers don't have
> elevator initialized but can still use blk-throttle.  This patch moves
> q->elevator test inside blk_drain_queue() such that only
> elv_drain_elevator() is skipped if !q->elevator.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Reported-by: Vivek Goyal <vgoyal@redhat.com>

Thanks Tejun for fixing this. Looks good to me. Just a minor nit below.

Acked-by: Vivek Goyal <vgoyal@redhat.com>

Vivek

[..]
> @@ -428,13 +434,8 @@ void blk_cleanup_queue(struct request_qu
>  	spin_unlock_irq(lock);
>  	mutex_unlock(&q->sysfs_lock);
>  
> -	/*
> -	 * Drain all requests queued before DEAD marking.  The caller might
> -	 * be trying to tear down @q before its elevator is initialized, in
> -	 * which case we don't want to call into draining.
> -	 */
> -	if (q->elevator)
> -		blk_drain_queue(q, true);
> +	/* drain all requests queued before DEAD marking */

We have already marked the queue DEAD before we start draining the queue.
May be we need to fix the comment.

> +	blk_drain_queue(q, true);

  reply	other threads:[~2012-02-13 23:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-13 22:52 [PATCH block/for-linus] block: blk-throttle should be drained regardless of q->elevator Tejun Heo
2012-02-13 23:27 ` Vivek Goyal [this message]
2012-02-13 23:40   ` Tejun Heo
2012-02-15 15:53     ` Vivek Goyal
2012-02-14  1:14 ` [PATCH UPDATED " Tejun Heo
2012-02-15 15:57   ` Vivek Goyal
2012-02-15 15:57   ` Jens Axboe

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=20120213232742.GH3130@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --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 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.