mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-26 21:54:31 +08:00
d3cf350e21
Currently mkfs uses its own create_uuid_tree(), but that function is only handling FS_TREE. This means for btrfs-convert we do not generate the uuid tree, nor add the UUID of the image subvolume. This can be a problem if we're going to support multiple subvolumes during mkfs time. To address this, introduce a new helper, btrfs_rebuild_uuid_tree(): - Create a new uuid tree if there is not one - Remove all the existing items from uuid tree - Iterate through all subvolumes * If the subvolume has no valid UUID, regenerate one * Add the uuid entry for the subvolume UUID * If the subvolume has received UUID, also add it to UUID tree By this, this new helper can handle all the uuid tree generation needs for: - Current mkfs Only one uuid entry for FS_TREE - Current btrfs-convert Only FS_TREE and the image subvolume - Future multi-subvolume mkfs As we do the scan for all subvolumes. - Future "btrfs rescue rebuild-uuid-tree" Signed-off-by: Qu Wenruo <wqu@suse.com> |
||
---|---|---|
.. | ||
common.c | ||
common.h | ||
main.c | ||
Makefile | ||
source-ext2.c | ||
source-ext2.h | ||
source-fs.c | ||
source-fs.h | ||
source-reiserfs.c | ||
source-reiserfs.h |