public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@fb.com>
Cc: linux-block@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 4/7] blk-mq: add and export helper to tell if a request is reserved
Date: Fri, 28 Apr 2017 23:22:06 +0800	[thread overview]
Message-ID: <20170428152205.GA25592@ming.t460p> (raw)
In-Reply-To: <1493391340-24629-5-git-send-email-axboe@fb.com>

On Fri, Apr 28, 2017 at 08:55:37AM -0600, Jens Axboe wrote:
> We only have an internal helper for checking a tag value. Add
> an exported helper that takes a request and hardware queue,
> and check against the driver tags.
> 
> Signed-off-by: Jens Axboe <axboe@fb.com>
> ---
>  block/blk-mq-tag.c     | 6 ++++++
>  include/linux/blk-mq.h | 1 +
>  2 files changed, 7 insertions(+)
> 
> diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
> index d0be72ccb091..0a04b5c14076 100644
> --- a/block/blk-mq-tag.c
> +++ b/block/blk-mq-tag.c
> @@ -476,3 +476,9 @@ u32 blk_mq_unique_tag(struct request *rq)
>  		(rq->tag & BLK_MQ_UNIQUE_TAG_MASK);
>  }
>  EXPORT_SYMBOL(blk_mq_unique_tag);
> +
> +bool blk_mq_rq_is_reserved(struct blk_mq_hw_ctx *hctx, struct request *rq)
> +{
> +	return blk_mq_tag_is_reserved(hctx->tags, rq->tag);
> +}
> +EXPORT_SYMBOL_GPL(blk_mq_rq_is_reserved);
> diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
> index 32bd8eb5ba67..13e51520fa27 100644
> --- a/include/linux/blk-mq.h
> +++ b/include/linux/blk-mq.h
> @@ -224,6 +224,7 @@ static inline u16 blk_mq_unique_tag_to_tag(u32 unique_tag)
>  	return unique_tag & BLK_MQ_UNIQUE_TAG_MASK;
>  }
>  
> +bool blk_mq_rq_is_reserved(struct blk_mq_hw_ctx *hctx, struct request *rq);
>  
>  int blk_mq_request_started(struct request *rq);
>  void blk_mq_start_request(struct request *rq);

Reviewed-by: Ming Lei <ming.lei@redhat.com>

Thanks,
Ming

  parent reply	other threads:[~2017-04-28 15:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-28 14:55 [PATCH v3 0/7] Fixup mtip32xx for scheduling Jens Axboe
2017-04-28 14:55 ` [PATCH 1/7] mtip32xx: get rid of 'atomic' argument to mtip_exec_internal_command() Jens Axboe
2017-04-28 14:55 ` [PATCH 2/7] mtip32xx: kill atomic argument to mtip_quiesce_io() Jens Axboe
2017-04-28 14:55 ` [PATCH 3/7] mtip32xx: abstract out "are any commands active" helper Jens Axboe
2017-04-28 14:55 ` [PATCH 4/7] blk-mq: add and export helper to tell if a request is reserved Jens Axboe
2017-04-28 15:04   ` Bart Van Assche
2017-04-28 15:22   ` Ming Lei [this message]
2017-05-02  6:12   ` Hannes Reinecke
2017-04-28 14:55 ` [PATCH 5/7] mtip32xx: convert internal command issue to block IO path Jens Axboe
2017-05-02  6:14   ` Hannes Reinecke
2017-04-28 14:55 ` [PATCH 6/7] blk-mq-sched: remove hack that bypasses scheduler for reserved requests Jens Axboe
2017-04-28 15:22   ` Ming Lei
2017-05-02  6:15   ` Hannes Reinecke
2017-04-28 14:55 ` [PATCH 7/7] Revert "mtip32xx: pass BLK_MQ_F_NO_SCHED" Jens Axboe
2017-05-02  6:15   ` Hannes Reinecke

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=20170428152205.GA25592@ming.t460p \
    --to=ming.lei@redhat.com \
    --cc=axboe@fb.com \
    --cc=hch@lst.de \
    --cc=linux-block@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