path: root/utils.h
diff options
authorEric Sandeen <>2014-05-14 12:39:07 -0500
committerDavid Sterba <>2014-08-22 14:39:32 +0200
commit85691ebeac9432b4ebb1a268514279a0b2c7c61d (patch)
tree463b954a6cede5d8bb0d8c6a825afbd030aec4a0 /utils.h
parente2a157f380aa33a264eab8e21280ea8bbc10d67e (diff)
btrfs-progs: mkfs: allow UUID specification at mkfs time
Allow the specification of the filesystem UUID at mkfs time. Non-unique unique IDs are rejected. This includes attempting to re-mkfs with the same UUID; if you really want to do that, you can mkfs with a new UUID, then re-mkfs with the one you wanted. (Implemented only for mkfs.btrfs, not btrfs-convert). Signed-off-by: Eric Sandeen <> [converted help to asciidoc] Signed-off-by: David Sterba <>
Diffstat (limited to 'utils.h')
1 files changed, 2 insertions, 1 deletions
diff --git a/utils.h b/utils.h
index db8d63c3..4cfd315a 100644
--- a/utils.h
+++ b/utils.h
@@ -40,7 +40,7 @@
int make_btrfs(int fd, const char *device, const char *label,
- u64 blocks[6], u64 num_bytes, u32 nodesize,
+ char *fs_uuid, u64 blocks[6], u64 num_bytes, u32 nodesize,
u32 leafsize, u32 sectorsize, u32 stripesize, u64 features);
int btrfs_make_root_dir(struct btrfs_trans_handle *trans,
struct btrfs_root *root, u64 objectid);
@@ -101,5 +101,6 @@ int get_btrfs_mount(const char *dev, char *mp, size_t mp_size);
int find_mount_root(const char *path, char **mount_root);
int get_device_info(int fd, u64 devid,
struct btrfs_ioctl_dev_info_args *di_args);
+int test_uuid_unique(char *fs_uuid);