btrfs-progs: build btrfs.static needs libbtrfsutil to build
[platform/upstream/btrfs-progs.git] / mkfs / main.c
index 40efa26..0337993 100644 (file)
@@ -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);
@@ -1290,6 +1295,12 @@ out:
                }
        }
 
+       if (!ret && close_ret) {
+               ret = close_ret;
+               error("failed to close ctree, the filesystem may be inconsistent: %d",
+                     ret);
+       }
+
        btrfs_close_all_devices();
        free(label);