]> Git Repo - linux.git/commit
block: Remember zone capacity when revalidating zones
authorDamien Le Moal <[email protected]>
Mon, 8 Apr 2024 01:41:06 +0000 (10:41 +0900)
committerJens Axboe <[email protected]>
Wed, 17 Apr 2024 14:44:02 +0000 (08:44 -0600)
commitecfe43b11b02ffeb24c203af7d3947417d412cf7
treeab600b0095c8c5acdfc5212b65e82bf20704d492
parentdd850ff3eee428b4e1276bd51263dd937643ba19
block: Remember zone capacity when revalidating zones

In preparation for adding zone write plugging, modify
blk_revalidate_disk_zones() to get the capacity of zones of a zoned
block device. This capacity value as a number of 512B sectors is stored
in the gendisk zone_capacity field.

Given that host-managed SMR disks (including zoned UFS drives) and all
known NVMe ZNS devices have the same zone capacity for all zones
blk_revalidate_disk_zones() returns an error if different capacities are
detected for different zones.

This also adds check to verify that the values reported by the device
for zone capacities are correct, that is, that the zone capacity is
never 0, does not exceed the zone size and is equal to the zone size for
conventional zones.

Signed-off-by: Damien Le Moal <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Tested-by: Hans Holmberg <[email protected]>
Tested-by: Dennis Maisenbacher <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
block/blk-zoned.c
include/linux/blkdev.h
This page took 0.057133 seconds and 4 git commands to generate.