summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-zoned-target.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-07-06 09:03:45 +0200
committerJens Axboe <axboe@kernel.dk>2022-07-06 14:46:26 +0200
commitb623e347323f6464b20fb0d899a0a73522ed8f6c (patch)
tree0b1aa4a992e6414b5ff3cb07e4979186d4dea33e /drivers/md/dm-zoned-target.c
parentblock: pass a gendisk to blk_queue_max_open_zones and blk_queue_max_active_zones (diff)
downloadlinux-b623e347323f6464b20fb0d899a0a73522ed8f6c.tar.xz
linux-b623e347323f6464b20fb0d899a0a73522ed8f6c.zip
block: replace blkdev_nr_zones with bdev_nr_zones
Pass a block_device instead of a request_queue as that is what most callers have at hand. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Acked-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> Link: https://lore.kernel.org/r/20220706070350.1703384-12-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-zoned-target.c')
-rw-r--r--drivers/md/dm-zoned-target.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-zoned-target.c b/drivers/md/dm-zoned-target.c
index 0ec5d8b9b1a4..6ba6ef44b00e 100644
--- a/drivers/md/dm-zoned-target.c
+++ b/drivers/md/dm-zoned-target.c
@@ -793,8 +793,7 @@ static int dmz_fixup_devices(struct dm_target *ti)
}
zone_nr_sectors = blk_queue_zone_sectors(q);
zoned_dev->zone_nr_sectors = zone_nr_sectors;
- zoned_dev->nr_zones =
- blkdev_nr_zones(zoned_dev->bdev->bd_disk);
+ zoned_dev->nr_zones = bdev_nr_zones(zoned_dev->bdev);
}
} else {
reg_dev = NULL;
@@ -805,7 +804,7 @@ static int dmz_fixup_devices(struct dm_target *ti)
}
q = bdev_get_queue(zoned_dev->bdev);
zoned_dev->zone_nr_sectors = blk_queue_zone_sectors(q);
- zoned_dev->nr_zones = blkdev_nr_zones(zoned_dev->bdev->bd_disk);
+ zoned_dev->nr_zones = bdev_nr_zones(zoned_dev->bdev);
}
if (reg_dev) {