mkfs.btrfs -b on a zoned device has several issues listed
below.
The FS size needs to be larger than minimal size that can host a btrfs,
but its calculation does not consider non-SINGLE profile
The calculation also does not ensure tree-log BG and data relocation BG
It allows creating a FS not aligned to the zone boundary
It resets all device zones beyond the specified length
This series fixes the issues with some cleanups.
This one passed CI workflow here:
Patches 1 to 3 are clean up patches, so they should not change the behavior.
Patches 4 to 6 address the issues.
Patches 7 to 10 add/modify the test cases. First, patch 7 adds nullb
functions to use in later patches. Patch 8 adds a new test for
zone resetting. And, patches 9 and 10 rewrites existing tests with the
nullb helper.
From Naohiro Aota:
mkfs.btrfs -b on a zoned device has several issues listed
below.
This series fixes the issues with some cleanups.
This one passed CI workflow here:
Patches 1 to 3 are clean up patches, so they should not change the behavior.
Patches 4 to 6 address the issues.
Patches 7 to 10 add/modify the test cases. First, patch 7 adds nullb functions to use in later patches. Patch 8 adds a new test for zone resetting. And, patches 9 and 10 rewrites existing tests with the nullb helper.
Changes: