[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <514f85ce-84fc-1186-7169-a29d7118e8cc@acm.org>
Date: Thu, 28 Jul 2022 06:29:09 -0700
From: Bart Van Assche <bvanassche@....org>
To: Pankaj Raghav <p.raghav@...sung.com>,
damien.lemoal@...nsource.wdc.com, hch@....de, axboe@...nel.dk,
snitzer@...nel.org, Johannes.Thumshirn@....com
Cc: matias.bjorling@....com, gost.dev@...sung.com,
linux-kernel@...r.kernel.org, hare@...e.de,
linux-block@...r.kernel.org, pankydev8@...il.com,
jaegeuk@...nel.org, dm-devel@...hat.com,
linux-nvme@...ts.infradead.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: Re: [PATCH v8 02/11] block: allow blk-zoned devices to have
non-power-of-2 zone size
On 7/28/22 05:11, Pankaj Raghav wrote:
> On 2022-07-28 01:16, Bart Van Assche wrote:
>> The bdev_is_zone_start() name seems more clear to me than
>> bdev_is_zone_aligned(). Has there already been a discussion about which
>> name to use for this function?
>>
> The reason I did s/bdev_is_zone_start/bdev_is_zone_aligned is that this
> name makes more sense for also checking if a given size is a multiple of
> zone sectors for e.g., used in PATCH 9:
>
> - if (len & (zone_sectors - 1)) {
> + if (!bdev_is_zone_aligned(bdev, len)) {
>
> I felt `bdev_is_zone_aligned` fits the use case of checking if the
> sector starts at the start of a zone and also check if a given length of
> sectors also align with the zone sectors. bdev_is_zone_start does not
> make the intention clear for the latter use case IMO.
>
> But I am fine with going back to bdev_is_zone_start if you and Damien
> feel strongly otherwise.
The "zone start LBA" terminology occurs in ZBC-1, ZBC-2 and ZNS but
"zone aligned" not. I prefer "zone start" because it is clear,
unambiguous and because it has the same meaning as in the corresponding
standards documents. I propose to proceed as follows for checking
whether a number of LBAs is a multiple of the zone length:
* Either use bdev_is_zone_start() directly.
* Or introduce a synonym for bdev_is_zone_start() with an appropriate
name, e.g. bdev_is_zone_len_multiple().
Thanks,
Bart.
Powered by blists - more mailing lists