mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-17 20:05:24 +00:00
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> |
||
---|---|---|
.. | ||
box.h | ||
defs.h | ||
device-scan.c | ||
device-scan.h | ||
device-utils.c | ||
device-utils.h | ||
extent-cache.c | ||
extent-cache.h | ||
format-output.c | ||
format-output.h | ||
fsfeatures.c | ||
fsfeatures.h | ||
help.c | ||
help.h | ||
internal.h | ||
messages.c | ||
messages.h | ||
path-utils.c | ||
path-utils.h | ||
rbtree-utils.c | ||
rbtree-utils.h | ||
send-stream.c | ||
send-stream.h | ||
send-utils.c | ||
send-utils.h | ||
string-table.c | ||
string-table.h | ||
task-utils.c | ||
task-utils.h | ||
utils-lib.c | ||
utils.c | ||
utils.h |