btrfs-progs/tests/mkfs-tests
Boris Burkov 92d92e99b7 btrfs-progs: mkfs: support free space tree as -R option
Add a runtime feature (-R) flag for the free space tree. A filesystem
that is mkfs'd with -R free-space-tree then mounted with no options has
the same contents as one mkfs'd without the option, then mounted with
'-o space_cache=v2'.

The only tricky thing is in exactly how to call the tree creation code.
Using btrfs_create_free_space_tree as is did not quite work, because an
extra reference to the eb (root->commit_root) is leaked, which mkfs
complains about with a warning. I opted to follow how the uuid tree is
created by adding it to the dirty roots list for cleanup by
commit_tree_roots in commit_transaction. As a result,
btrfs_create_free_space_tree no longer exactly matches the version in
the kernel sources.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
2020-09-08 22:06:04 +02:00
..
001-basic-profiles btrfs-progs: tests: add raid1c34 to basic mkfs tests 2019-11-22 19:09:50 +01:00
002-no-force-mixed-on-small-volume
003-mixed-with-wrong-nodesize
004-rootdir-keeps-size btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
005-long-device-name-for-ssd btrfs-progs: tests: skip tests if dmsetup is not available 2020-03-31 18:37:34 +02:00
006-partitioned-loopdev
007-mix-nodesize-sectorsize btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
008-sectorsize-nodesize-combination
009-special-files-for-rootdir btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
010-minimal-size btrfs-progs: tests: switch messages to _log 2019-07-26 17:46:42 +02:00
011-rootdir-create-file btrfs-progs: tests: mkfs/011: Fix path for rootdir 2020-01-09 14:27:09 +01:00
012-rootdir-no-shrink btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
013-reserved-1M-for-single btrfs-progs: tests: switch messages to _log 2019-07-26 17:46:42 +02:00
014-rootdir-inline-extent btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
015-fstree-uuid-otime btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
016-rootdir-bad-symbolic-link
017-small-backing-size-thin-provision-device btrfs-progs: tests: skip tests if dmsetup is not available 2020-03-31 18:37:34 +02:00
018-multidevice-overflow btrfs-progs: tests: mkfs/018, fix check for truncate command failure 2020-05-04 20:48:35 +02:00
019-basic-checksums-mkfs btrfs-progs: mkfs-tests: only check supported checksums 2020-03-03 19:58:54 +01:00
020-basic-checksums-mount btrfs-progs: mkfs-tests: only check supported checksums 2020-03-03 19:58:54 +01:00
021-rfeatures-quota-rootdir btrfs-progs: tests: add test for quotas and --rootdir 2020-05-29 12:42:48 +02:00
022-rootdir-size btrfs-progs: tests: rename mkfs/021-rootdir-size to 022 2020-07-21 15:43:23 +02:00
023-free-space-tree btrfs-progs: mkfs: support free space tree as -R option 2020-09-08 22:06:04 +02:00