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.
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/dm-devel