btrfs: zoned: fail mount if the device does not support zone append
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 16 Apr 2021 03:05:27 +0000 (12:05 +0900)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:23 +0000 (17:25 +0200)
commit1d68128c107a0b8c0c9125cb05d4771ddc438369
tree1f93c8270039cee0cd757ce5217daace8ff206fb
parent061dde8245356d8864d29e25207aa4daa0be4d3c
btrfs: zoned: fail mount if the device does not support zone append

For zoned btrfs, zone append is mandatory to write to a sequential write
only zone, otherwise parallel writes to the same zone could result in
unaligned write errors.

If a zoned block device does not support zone append (e.g. a dm-crypt
zoned device using a non-NULL IV cypher), fail to mount.

CC: stable@vger.kernel.org # 5.12
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c