dm zoned: check zone capacity
authorDamien Le Moal <damien.lemoal@wdc.com>
Wed, 19 May 2021 01:26:16 +0000 (10:26 +0900)
committerMike Snitzer <snitzer@redhat.com>
Fri, 4 Jun 2021 16:07:28 +0000 (12:07 -0400)
commitbab68499428ed934f0493ac74197ed6f36204260
tree278195754b009ed5b5a3c75cc40e3d6e63d0fe89
parentccde2cbfa31c4d41818a493c1126df05336f8c5a
dm zoned: check zone capacity

The dm-zoned target cannot support zoned block devices with zones that
have a capacity smaller than the zone size (e.g. NVMe zoned namespaces)
due to the current chunk zone mapping implementation as it is assumed
that zones and chunks have the same size with all blocks usable.
If a zoned drive is found to have zones with a capacity different from
the zone size, fail the target initialization.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: stable@vger.kernel.org # v5.9+
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-zoned-metadata.c