On 3/25/24 05:44, Damien Le Moal wrote:
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.

Signed-off-by: Damien Le Moal <dlem...@kernel.org>
---
  block/blk-zoned.c      | 15 +++++++++++++++
  include/linux/blkdev.h |  1 +
  2 files changed, 16 insertions(+)

That again. We should never have allowed zones with different sizes.
Anyway.

Reviewed-by: Hannes Reinecke <h...@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke                  Kernel Storage Architect
h...@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich


Reply via email to