]> git.ipfire.org Git - thirdparty/linux.git/commit
block: introduce BLKREPORTZONESV2 ioctl
authorDamien Le Moal <dlemoal@kernel.org>
Tue, 4 Nov 2025 21:22:45 +0000 (06:22 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 5 Nov 2025 15:07:21 +0000 (08:07 -0700)
commitb30ffcdc0c15a88f8866529d3532454e02571221
treeaaf78fc5e8626022f7e5e32b0e1884d0620b5b88
parent31f0656a4ab712edf2888eabcc0664197a4a938e
block: introduce BLKREPORTZONESV2 ioctl

Introduce the new BLKREPORTZONESV2 ioctl command to allow user
applications access to the fast zone report implemented by
blkdev_report_zones_cached(). This new ioctl is defined as number 142
and is documented in include/uapi/linux/fs.h.

Unlike the existing BLKREPORTZONES ioctl, this new ioctl uses the flags
field of struct blk_zone_report also as an input. If the user sets the
BLK_ZONE_REP_CACHED flag as an input, then blkdev_report_zones_cached()
is used to generate the zone report using cached zone information. If
this flag is not set, then BLKREPORTZONESV2 behaves in the same manner
as BLKREPORTZONES and the zone report is generated by accessing the
zoned device.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-zoned.c
block/ioctl.c
include/uapi/linux/blkzoned.h
include/uapi/linux/fs.h