linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk, jgarzik@pobox.com, davem@davemloft.net,
	hch@infradead.org, ctalbott@google.com, rni@google.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/6] block: add blk_queue_dead()
Date: Wed, 26 Oct 2011 13:20:49 -0400	[thread overview]
Message-ID: <20111026172049.GD355@redhat.com> (raw)
In-Reply-To: <1319590927-15791-5-git-send-email-tj@kernel.org>

On Tue, Oct 25, 2011 at 06:02:05PM -0700, Tejun Heo wrote:
> There are a number of QUEUE_FLAG_DEAD tests.  Add blk_queue_dead()
> macro and use it.
> 
> This patch doesn't introduce any functional difference.
> 
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Jens Axboe <axboe@kernel.dk>
> ---
>  block/blk-core.c       |    6 +++---
>  block/blk-exec.c       |    2 +-
>  block/blk-sysfs.c      |    4 ++--
>  block/blk-throttle.c   |    4 ++--
>  block/blk.h            |    2 +-
>  include/linux/blkdev.h |    1 +
>  6 files changed, 10 insertions(+), 9 deletions(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 1efb943..7d39897 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -603,7 +603,7 @@ EXPORT_SYMBOL(blk_init_allocated_queue_node);
>  
>  int blk_get_queue(struct request_queue *q)
>  {
> -	if (likely(!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
> +	if (likely(!blk_queue_dead(q))) {
>  		kobject_get(&q->kobj);
>  		return 0;

I thought DEAD flag is now synchronized with queue lock. So the protocol
is that caller should be holding queue lock here first?

Thanks
Vivek

  parent reply	other threads:[~2011-10-26 17:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26  1:02 [PATCHSET block:for-3.2/core] further updates to blk_cleanup_queue(), take#2 Tejun Heo
2011-10-26  1:02 ` [PATCH 1/6] block, sx8: kill blk_insert_request() Tejun Heo
2011-10-26  1:19   ` Jeff Garzik
2011-10-26  8:12   ` Jens Axboe
2011-10-26  1:02 ` [PATCH 2/6] block: allow blk_execute_rq_nowait() to be called from IRQ context Tejun Heo
2011-10-26  8:11   ` Jens Axboe
2011-10-26 19:21     ` Tejun Heo
2011-10-26  1:02 ` [PATCH 3/6] block, ide: unexport elv_add_request() Tejun Heo
2011-10-26  1:02 ` [PATCH 4/6] block: add blk_queue_dead() Tejun Heo
2011-10-26  8:18   ` Jens Axboe
2011-10-26 17:20   ` Vivek Goyal [this message]
2011-10-26 19:25     ` Tejun Heo
2011-10-26  1:02 ` [PATCH 5/6] block: fix drain_all condition in blk_drain_queue() Tejun Heo
2011-10-26  1:02 ` [PATCH 6/6] block: add missing blk_queue_dead() checks Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2011-10-21  3:56 [PATCHSET block:for-3.2/core] further updates to blk_cleanup_queue() Tejun Heo
2011-10-21  3:56 ` [PATCH 4/6] block: add blk_queue_dead() Tejun Heo

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=20111026172049.GD355@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=ctalbott@google.com \
    --cc=davem@davemloft.net \
    --cc=hch@infradead.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rni@google.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).