linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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, Jaegeuk Kim <jaegeuk@kernel.org>,
	Avri Altman <avri.altman@wdc.com>
Subject: Re: [PATCH 1/8] block: Document blk_queue_zone_is_seq() and blk_rq_zone_is_seq()
Date: Tue, 10 Jan 2023 08:36:58 +0900	[thread overview]
Message-ID: <ecf73d9b-812d-3e35-7c45-61950f6ce1c4@opensource.wdc.com> (raw)
In-Reply-To: <20230109232738.169886-2-bvanassche@acm.org>

On 1/10/23 08:27, Bart Van Assche wrote:
> Since it is nontrivial to figure out how disk_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>
> ---
>  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 779fba613bd0..6735db1ad24d 100644
> --- a/include/linux/blk-mq.h
> +++ b/include/linux/blk-mq.h
> @@ -1155,6 +1155,13 @@ static inline unsigned int blk_rq_zone_no(struct request *rq)
>  	return disk_zone_no(rq->q->disk, 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 to a sequential write preferred zone.

May be change this to "...blk_rq_pos(@rq) is targeting either a sequential
write required zone or a sequential write preferred zone."

> + */
>  static inline unsigned int blk_rq_zone_is_seq(struct request *rq)
>  {
>  	return disk_zone_is_seq(rq->q->disk, blk_rq_pos(rq));
> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index b87ed829ab94..ef93e848b1fd 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -672,6 +672,15 @@ static inline unsigned int disk_zone_no(struct gendisk *disk, sector_t sector)
>  	return sector >> ilog2(disk->queue->limits.chunk_sectors);
>  }
>  
> +/**
> + * disk_zone_is_seq() - Whether a logical block is in a sequential zone.
> + * @disk: Disk pointer.
> + * @sector: Offset from start of block device in 512 byte units.
> + *
> + * Return: true if and only if @disk refers to a zoned block device and
> + * @sector refers either to a sequential write required or a sequential
> + * write preferred zone.

May be change this to "...and @sector is contained either in a sequential
write required zone or a sequential write preferred zone."

> + */
>  static inline bool disk_zone_is_seq(struct gendisk *disk, sector_t sector)
>  {
>  	if (!blk_queue_is_zoned(disk->queue))

With that fixed,

Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>

-- 
Damien Le Moal
Western Digital Research


  reply	other threads:[~2023-01-09 23:37 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-09 23:27 [PATCH 0/8] Enable zoned write pipelining for UFS devices Bart Van Assche
2023-01-09 23:27 ` [PATCH 1/8] block: Document blk_queue_zone_is_seq() and blk_rq_zone_is_seq() Bart Van Assche
2023-01-09 23:36   ` Damien Le Moal [this message]
2023-01-09 23:27 ` [PATCH 2/8] block: Introduce the blk_rq_is_seq_zone_write() function Bart Van Assche
2023-01-09 23:38   ` Damien Le Moal
2023-01-09 23:52     ` Bart Van Assche
2023-01-10  9:52       ` Niklas Cassel
2023-01-10 11:54         ` Damien Le Moal
2023-01-10 12:13           ` Niklas Cassel
2023-01-10 12:41             ` Damien Le Moal
2023-01-09 23:27 ` [PATCH 3/8] block: Introduce a request queue flag for pipelining zoned writes Bart Van Assche
2023-01-09 23:27 ` [PATCH 4/8] block/mq-deadline: Only use zone locking if necessary Bart Van Assche
2023-01-09 23:46   ` Damien Le Moal
2023-01-09 23:51     ` Bart Van Assche
2023-01-09 23:56       ` Damien Le Moal
2023-01-10  0:19         ` Bart Van Assche
2023-01-10  0:32           ` Damien Le Moal
2023-01-10  0:38             ` Jens Axboe
2023-01-10  0:41               ` Jens Axboe
2023-01-10  0:44                 ` Bart Van Assche
2023-01-10  0:48                   ` Jens Axboe
2023-01-10  0:56                     ` Bart Van Assche
2023-01-10  1:03                       ` Jens Axboe
2023-01-10  1:17                         ` Bart Van Assche
2023-01-10  1:48                           ` Jens Axboe
2023-01-10  2:24                     ` Damien Le Moal
2023-01-10  3:00                       ` Jens Axboe
2023-01-09 23:27 ` [PATCH 5/8] block/null_blk: Refactor null_queue_rq() Bart Van Assche
2023-01-09 23:27 ` [PATCH 6/8] block/null_blk: Add support for pipelining zoned writes Bart Van Assche
2023-01-09 23:27 ` [PATCH 7/8] scsi: Retry unaligned " Bart Van Assche
2023-01-09 23:51   ` Damien Le Moal
2023-01-09 23:55     ` Bart Van Assche
2023-01-09 23:27 ` [PATCH 8/8] scsi: ufs: Enable zoned write pipelining Bart Van Assche
2023-01-10  9:16   ` Avri Altman
2023-01-10 17:42     ` Bart Van Assche
2023-01-10 12:23   ` Bean Huo
2023-01-10 17:41     ` 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=ecf73d9b-812d-3e35-7c45-61950f6ce1c4@opensource.wdc.com \
    --to=damien.lemoal@opensource.wdc.com \
    --cc=avri.altman@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=jaegeuk@kernel.org \
    --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).