summaryrefslogtreecommitdiff
path: root/mkfs
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-02-27 20:38:49 +0100
committerDavid Sterba <dsterba@suse.com>2018-03-30 22:15:55 +0200
commit2a496a5b8b74752cf3823652ccbb529f160e9878 (patch)
tree08c3234100d86f332e48cd0e0d85394d6010921d /mkfs
parenta4cd4ae0b38a79fdc61aebf81267d5e10bb39d8f (diff)
btrfs-progs: mkfs: precreate the uuid tree
We can easily create the uuid tree that's usually created after first mount. The kernel will still check the tree on first mount so we don't try to fake the uuid tree generation so it appears consistent, even if it's empty. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mkfs')
-rw-r--r--mkfs/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mkfs/main.c b/mkfs/main.c
index 40efa26b..b65b18dd 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -1208,6 +1208,11 @@ raid_groups:
goto out;
}
+ ret = create_tree(trans, root, BTRFS_UUID_TREE_OBJECTID);
+ if (ret)
+ warning(
+ "unable to create uuid tree, will be created after mount: %d", ret);
+
ret = btrfs_commit_transaction(trans, root);
if (ret) {
error("unable to commit transaction: %d", ret);