Pankaj Raghav d67ea690ce block: introduce bdev_zone_no helper
Add a generic bdev_zone_no() helper to calculate zone number for a
given sector in a block device. This helper internally uses disk_zone_no()
to find the zone number.

Use the helper bdev_zone_no() to calculate nr of zones. This lets us
make modifications to the math if needed in one place.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
Link: https://lore.kernel.org/r/20230110143635.77300-4-p.raghav@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-01-29 15:18:34 -07:00
..
2023-01-14 07:38:48 +09:00
2023-01-12 17:02:20 -06:00
2023-01-12 05:56:06 -06:00
2023-01-27 14:05:38 +01:00
2023-01-27 13:18:14 -08:00
2023-01-18 14:44:32 -08:00
2023-01-29 11:06:47 -08:00
2023-01-27 16:09:12 -08:00
2023-01-29 15:18:34 -07:00
2023-01-13 17:32:22 -06:00
2023-01-24 17:42:53 -08:00
2023-01-10 23:09:09 +01:00
2023-01-21 11:12:42 -08:00
2023-01-21 11:10:03 -08:00
2023-01-12 17:02:20 -06:00
2023-01-12 17:02:20 -06:00