1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-19 04:44:09 +00:00
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
..
2022-12-15 09:45:51 -08:00
2022-12-21 09:19:24 -08:00
2022-12-12 15:19:38 -08:00
2022-12-17 14:06:53 -06:00
2022-12-19 08:47:33 -06:00
2023-01-07 10:38:11 -08:00
2023-01-04 14:43:27 -07:00
2022-12-13 10:43:59 -08:00
2022-12-13 10:43:59 -08:00
2023-01-29 15:18:34 -07:00
2022-12-12 15:48:36 -08:00
2022-12-13 15:47:48 -08:00
2022-12-13 19:29:45 -08:00
2022-12-16 03:54:54 -08:00
2023-01-29 15:18:33 -07:00
2023-01-29 15:18:33 -07:00
2022-12-13 10:33:08 -08:00
2022-12-17 14:06:53 -06:00
2022-12-13 09:47:48 -08:00
2022-12-14 09:15:43 -08:00
2022-12-16 03:54:54 -08:00
2022-12-15 11:12:21 -08:00
2022-12-13 09:47:48 -08:00
2022-12-13 09:47:48 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 15:47:48 -08:00
2022-12-15 11:12:21 -08:00
2022-12-14 09:54:10 -08:00
2022-12-17 14:06:53 -06:00
2023-01-04 14:44:13 -07:00
2022-12-20 03:13:45 +01:00
2022-12-16 03:54:54 -08:00
2022-12-21 09:41:28 -08:00
2022-12-13 15:47:48 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 09:47:48 -08:00
2022-12-13 10:43:59 -08:00
2022-12-15 13:12:15 -08:00