From 72cd87576d1d885fc2968416ed5aca8f54749653 Mon Sep 17 00:00:00 2001 From: Damien Le Moal Date: Fri, 12 Oct 2018 19:08:45 +0900 Subject: block: Introduce BLKGETZONESZ ioctl Get a zoned block device zone size in number of 512 B sectors. The zone size is always 0 for regular block devices. Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Damien Le Moal Signed-off-by: Jens Axboe --- block/ioctl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'block') diff --git a/block/ioctl.c b/block/ioctl.c index 3884d810efd2..f6d2c6f1f050 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -532,6 +532,8 @@ int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, return blkdev_report_zones_ioctl(bdev, mode, cmd, arg); case BLKRESETZONE: return blkdev_reset_zones_ioctl(bdev, mode, cmd, arg); + case BLKGETZONESZ: + return put_uint(arg, bdev_zone_sectors(bdev)); case HDIO_GETGEO: return blkdev_getgeo(bdev, argp); case BLKRAGET: -- cgit v1.2.3-70-g09d2