btrfs: zoned: allow DUP on meta-data block groups
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Wed, 26 Jan 2022 13:46:23 +0000 (05:46 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:19:50 +0000 (16:19 +0100)
commitdcf5652291f6bfb9e31964b1c1a7270a61bd9fe8
tree630d0ce70049c68a3b69477240f2c056534b95bd
parentf5569fe07224511840b83563a902966c6273e12f
btrfs: zoned: allow DUP on meta-data block groups

Allow creating or reading block-groups on a zoned device with DUP as a
meta-data profile.

This works because we're using the zoned_meta_io_lock and REQ_OP_WRITE
operations for meta-data on zoned btrfs, so all writes to meta-data zones
are aligned to the zone's write-pointer.

Upon loading of the block-group, it is ensured both zones do have the same
zone capacity and write-pointer offsets, so no extra machinery is needed
to keep the write-pointers in sync for the meta-data zones. If this
prerequisite is not met, loading of the block-group is refused.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c