[PATCH 08/13] block: introduce blkdev_get_zone_info()
Christoph Hellwig
hch at lst.de
Mon Nov 3 02:29:02 PST 2025
On Mon, Nov 03, 2025 at 03:08:30PM +0900, Damien Le Moal wrote:
> On 11/1/25 06:40, Bart Van Assche wrote:
> >> +/**
> >> + * blkdev_get_zone_info - Get a zone information from cached data
> >
> > "Get a zone information" -> "Get zone information"
> >
> >> + sector = sector & (~(zone_sectors - 1));
> >
> > Please consider changing the above assignment into:
> >
> > sector -= bdev_offset_from_zone_start(bdev, sector);
>
> That is a lot more arithmetic for the same thing.
> If anything, I think this should be:
>
> sector = ALIGN(sector, zone_sectors);
That would have to be ALIGN_DOWN I think. Which sounds useful to
clean things up to me.
More information about the Linux-nvme
mailing list