Many places in the filesystem for zoned devices open code this function
to find the zone number for a given sector with power of 2 assumption.
This generic helper can be used to calculate zone number for a given
sector in a block device
This helper internally uses blk_queue_zone_no to find the zon
On 4/27/22 09:02, Pankaj Raghav wrote:
+static inline unsigned int bdev_zone_no(struct block_device *bdev, sector_t
sec)
+{
+ struct request_queue *q = bdev_get_queue(bdev);
+
+ if (q)
+ return blk_queue_zone_no(q, sec);
+ return 0;
+}
This patch series has been