Re: [PATCH 1/2] block: introduce zone capacity helper

Christoph Hellwig
2025-03-12T05:27:37Z

On Wed, Mar 12, 2025 at 10:31:03AM +0900, Naohiro Aota wrote:
> +#ifdef CONFIG_BLK_DEV_ZONED
> +static inline unsigned int disk_zone_capacity(struct gendisk *disk, sector_t pos)

Overly long line.

> +{
> + sector_t zone_sectors = disk->queue->limits.chunk_sectors;
> +
> + if (pos + zone_sectors >= get_capacity(disk))
> + return disk->last_zone_capacity;
> + return disk->zone_capacity;

But I also don't understand how pos plays in here. Maybe add a
kerneldoc comment describing what the function is supposed to do?