All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Asias He <asias@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] blk-mq: add blk_mq_stop_hw_queues
Date: Fri, 25 Oct 2013 14:44:10 +0100	[thread overview]
Message-ID: <20131025134410.GB2815@kernel.dk> (raw)
In-Reply-To: <20131025130735.440114225@bombadil.infradead.org>

On Fri, Oct 25 2013, Christoph Hellwig wrote:
> Add a helper to iterate over all hw queues and stop them.  This is useful
> for driver that implement PM suspend functionality.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/blk-mq.c         |   12 ++++++++++++
>  include/linux/blk-mq.h |    1 +
>  2 files changed, 13 insertions(+)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index f21ec96..04050a3 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -679,6 +679,18 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
>  }
>  EXPORT_SYMBOL(blk_mq_start_hw_queue);
>  
> +void blk_mq_stop_hw_queues(struct request_queue *q)
> +{
> +	struct blk_mq_hw_ctx *hctx;
> +	int i;
> +
> +	queue_for_each_hw_ctx(q, hctx, i) {
> +		cancel_delayed_work(&hctx->delayed_work);
> +		set_bit(BLK_MQ_S_STOPPED, &hctx->state);
> +	}

I changed this to call blk_mq_stop_hw_queue() instead.

-- 
Jens Axboe


  reply	other threads:[~2013-10-25 13:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-25 13:04 [PATCH 0/2] block multiqueue support for virtio-blk Christoph Hellwig
2013-10-25 13:05 ` [PATCH 1/2] blk-mq: add blk_mq_stop_hw_queues Christoph Hellwig
2013-10-25 13:44   ` Jens Axboe [this message]
2013-10-25 13:05 ` [PATCH 2/2] virtio_blk: blk-mq support Christoph Hellwig
2013-10-25 13:51   ` Jens Axboe
2013-10-25 16:06   ` Asias He
2013-10-28  2:47   ` Rusty Russell
2013-10-28  8:52     ` Christoph Hellwig
2013-10-29 21:34       ` Jens Axboe
2013-10-30  8:51         ` Asias He
2013-11-01 16:45           ` Christoph Hellwig
2013-11-01 17:00             ` 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=20131025134410.GB2815@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=asias@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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.