diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index a03a96650548..e4488b57a7ae 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/migrate.h> | 31 | #include <linux/migrate.h> |
32 | #include <linux/ratelimit.h> | 32 | #include <linux/ratelimit.h> |
33 | #include <linux/uuid.h> | ||
33 | #include <asm/unaligned.h> | 34 | #include <asm/unaligned.h> |
34 | #include "compat.h" | 35 | #include "compat.h" |
35 | #include "ctree.h" | 36 | #include "ctree.h" |
@@ -1280,6 +1281,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans, | |||
1280 | struct btrfs_key key; | 1281 | struct btrfs_key key; |
1281 | int ret = 0; | 1282 | int ret = 0; |
1282 | u64 bytenr; | 1283 | u64 bytenr; |
1284 | uuid_le uuid; | ||
1283 | 1285 | ||
1284 | root = btrfs_alloc_root(fs_info); | 1286 | root = btrfs_alloc_root(fs_info); |
1285 | if (!root) | 1287 | if (!root) |
@@ -1329,6 +1331,8 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans, | |||
1329 | btrfs_set_root_used(&root->root_item, leaf->len); | 1331 | btrfs_set_root_used(&root->root_item, leaf->len); |
1330 | btrfs_set_root_last_snapshot(&root->root_item, 0); | 1332 | btrfs_set_root_last_snapshot(&root->root_item, 0); |
1331 | btrfs_set_root_dirid(&root->root_item, 0); | 1333 | btrfs_set_root_dirid(&root->root_item, 0); |
1334 | uuid_le_gen(&uuid); | ||
1335 | memcpy(root->root_item.uuid, uuid.b, BTRFS_UUID_SIZE); | ||
1332 | root->root_item.drop_level = 0; | 1336 | root->root_item.drop_level = 0; |
1333 | 1337 | ||
1334 | key.objectid = objectid; | 1338 | key.objectid = objectid; |