From: Damien Le Moal <damien.lemoal@opensource.wdc.com>
To: Bart Van Assche <bvanassche@acm.org>, Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v2 1/6] block: Document blk_queue_zone_is_seq() and blk_rq_zone_is_seq()
Date: Fri, 24 Jun 2022 09:10:53 +0900 [thread overview]
Message-ID: <08b2ed02-d0b6-4dbb-a944-7ff2d91724a7@opensource.wdc.com> (raw)
In-Reply-To: <20220623232603.3751912-2-bvanassche@acm.org>
On 6/24/22 08:25, Bart Van Assche wrote:
> Since it is nontrivial to figure out how blk_queue_zone_is_seq() and
> blk_rq_zone_is_seq() handle sequential write preferred zones, document
> this.
>
> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Looks good.
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> ---
> include/linux/blk-mq.h | 7 +++++++
> include/linux/blkdev.h | 9 +++++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
> index e2d9daf7e8dd..909d47e34b7c 100644
> --- a/include/linux/blk-mq.h
> +++ b/include/linux/blk-mq.h
> @@ -1124,6 +1124,13 @@ static inline unsigned int blk_rq_zone_no(struct request *rq)
> return blk_queue_zone_no(rq->q, blk_rq_pos(rq));
> }
>
> +/**
> + * blk_rq_zone_is_seq() - Whether a request is for a sequential zone.
> + * @rq: Request pointer.
> + *
> + * Return: true if and only if blk_rq_pos(@rq) refers either to a sequential
> + * write required or a sequential write preferred zone.
> + */
> static inline unsigned int blk_rq_zone_is_seq(struct request *rq)
> {
> return blk_queue_zone_is_seq(rq->q, blk_rq_pos(rq));
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 92b3bffad328..2904100d2485 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -688,6 +688,15 @@ static inline unsigned int blk_queue_zone_no(struct request_queue *q,
> return sector >> ilog2(q->limits.chunk_sectors);
> }
>
> +/**
> + * blk_queue_zone_is_seq() - Whether a logical block is in a sequential zone.
> + * @q: Request queue pointer.
> + * @sector: Offset from start of block device in 512 byte units.
> + *
> + * Return: true if and only if @q is associated with a zoned block device and
> + * @sector refers either to a sequential write required or a sequential write
> + * preferred zone.
> + */
> static inline bool blk_queue_zone_is_seq(struct request_queue *q,
> sector_t sector)
> {
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2022-06-24 0:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-23 23:25 [PATCH v2 0/6] Improve zoned storage write performance Bart Van Assche
2022-06-23 23:25 ` [PATCH v2 1/6] block: Document blk_queue_zone_is_seq() and blk_rq_zone_is_seq() Bart Van Assche
2022-06-24 0:10 ` Damien Le Moal [this message]
2022-06-23 23:25 ` [PATCH v2 2/6] block: Introduce the blk_rq_is_zoned_seq_write() function Bart Van Assche
2022-06-24 0:15 ` Damien Le Moal
2022-06-24 6:07 ` Christoph Hellwig
2022-06-24 16:35 ` Bart Van Assche
2022-06-23 23:26 ` [PATCH v2 3/6] block: Introduce a request queue flag for pipelining zoned writes Bart Van Assche
2022-06-24 0:19 ` Damien Le Moal
2022-06-24 16:29 ` Bart Van Assche
2022-06-23 23:26 ` [PATCH v2 4/6] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2022-06-24 0:24 ` Damien Le Moal
2022-06-23 23:26 ` [PATCH v2 5/6] block/null_blk: Refactor null_queue_rq() Bart Van Assche
2022-06-24 0:26 ` Damien Le Moal
2022-06-23 23:26 ` [PATCH v2 6/6] block/null_blk: Add support for pipelining zoned writes Bart Van Assche
2022-06-24 0:29 ` Damien Le Moal
2022-06-24 6:06 ` Christoph Hellwig
2022-06-24 16:45 ` Bart Van Assche
2022-06-25 9:25 ` Christoph Hellwig
2022-06-26 0:23 ` Bart Van Assche
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=08b2ed02-d0b6-4dbb-a944-7ff2d91724a7@opensource.wdc.com \
--to=damien.lemoal@opensource.wdc.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--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;
as well as URLs for NNTP newsgroup(s).