mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-27 16:42:17 +00:00
92d92e99b7
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> |
||
---|---|---|
.. | ||
backref.c | ||
backref.h | ||
ctree.c | ||
ctree.h | ||
delayed-ref.c | ||
delayed-ref.h | ||
dir-item.c | ||
disk-io.c | ||
disk-io.h | ||
extent_io.c | ||
extent_io.h | ||
extent-tree.c | ||
file-item.c | ||
file.c | ||
free-space-cache.c | ||
free-space-cache.h | ||
free-space-tree.c | ||
free-space-tree.h | ||
inode-item.c | ||
inode.c | ||
print-tree.c | ||
print-tree.h | ||
root-tree.c | ||
transaction.c | ||
transaction.h | ||
ulist.c | ||
ulist.h | ||
uuid-tree.c | ||
volumes.c | ||
volumes.h |