diff options
author | Chris Mason <chris.mason@fusionio.com> | 2012-07-25 19:17:39 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-07-25 19:19:10 -0400 |
commit | 113c1cb530e10bcada93d88ffaa6b521aae2d251 (patch) | |
tree | e41776281314eb8fdc6b07e1533491e5f9ec21af /fs/btrfs/disk-io.c | |
parent | cd1cfc49153ba2bef247e500d8bd4d135193ece9 (diff) | |
parent | 31db9f7c23fbf7e95026143f79645de6507b583b (diff) |
Merge branch 'send-v2' of git://github.com/ablock84/linux-btrfs into for-linus
This is the kernel portion of btrfs send/receive
Conflicts:
fs/btrfs/Makefile
fs/btrfs/backref.h
fs/btrfs/ctree.c
fs/btrfs/ioctl.c
fs/btrfs/ioctl.h
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 05f4fb6e0607..502b20c56e84 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1182,6 +1182,8 @@ static void __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize, | |||
1182 | root->defrag_running = 0; | 1182 | root->defrag_running = 0; |
1183 | root->root_key.objectid = objectid; | 1183 | root->root_key.objectid = objectid; |
1184 | root->anon_dev = 0; | 1184 | root->anon_dev = 0; |
1185 | |||
1186 | spin_lock_init(&root->root_times_lock); | ||
1185 | } | 1187 | } |
1186 | 1188 | ||
1187 | static int __must_check find_and_setup_root(struct btrfs_root *tree_root, | 1189 | static int __must_check find_and_setup_root(struct btrfs_root *tree_root, |
@@ -1402,6 +1404,7 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root, | |||
1402 | u64 generation; | 1404 | u64 generation; |
1403 | u32 blocksize; | 1405 | u32 blocksize; |
1404 | int ret = 0; | 1406 | int ret = 0; |
1407 | int slot; | ||
1405 | 1408 | ||
1406 | root = btrfs_alloc_root(fs_info); | 1409 | root = btrfs_alloc_root(fs_info); |
1407 | if (!root) | 1410 | if (!root) |
@@ -1428,9 +1431,8 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root, | |||
1428 | ret = btrfs_search_slot(NULL, tree_root, location, path, 0, 0); | 1431 | ret = btrfs_search_slot(NULL, tree_root, location, path, 0, 0); |
1429 | if (ret == 0) { | 1432 | if (ret == 0) { |
1430 | l = path->nodes[0]; | 1433 | l = path->nodes[0]; |
1431 | read_extent_buffer(l, &root->root_item, | 1434 | slot = path->slots[0]; |
1432 | btrfs_item_ptr_offset(l, path->slots[0]), | 1435 | btrfs_read_root_item(tree_root, l, slot, &root->root_item); |
1433 | sizeof(root->root_item)); | ||
1434 | memcpy(&root->root_key, location, sizeof(*location)); | 1436 | memcpy(&root->root_key, location, sizeof(*location)); |
1435 | } | 1437 | } |
1436 | btrfs_free_path(path); | 1438 | btrfs_free_path(path); |