btrfs: zoned: allow zoned filesystems on non-zoned block devices
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 4 Feb 2021 10:21:47 +0000 (19:21 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 9 Feb 2021 01:32:21 +0000 (02:32 +0100)
commit3c9daa09ccd43f68104634020b364d834c01738c
tree0457023b30beacfa24237b25856f814aa9e53271
parent1cb3dc3f79153c2d7f9a4438381e1385dff09656
btrfs: zoned: allow zoned filesystems on non-zoned block devices

Run a zoned filesystem on non-zoned devices. This is done by "slicing up"
the block device into static sized chunks and fake a conventional zone on
each of them. The emulated zone size is determined from the size of device
extent.

This is mainly aimed at testing of zoned filesystems, i.e. the zoned
chunk allocator, on regular block devices.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/zoned.c
fs/btrfs/zoned.h