summaryrefslogtreecommitdiff
path: root/find-root.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-04-01 12:57:11 +0200
committerDavid Sterba <dsterba@suse.com>2016-05-02 14:40:18 +0200
commit2a796d84af42403ea149d35ee5578741c5470474 (patch)
tree92f7ee711ce0bdad0f563a638305985230c08495 /find-root.c
parentb005ca024990569d2de459485682158633937928 (diff)
btrfs-progs: replace leafsize with nodesize
Nodesize is used in kernel, the values are always equal. We have to keep leafsize in headers, similarly the tree setting functions still take and set leafsize, but it's effectively a no-op. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'find-root.c')
-rw-r--r--find-root.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/find-root.c b/find-root.c
index 823db6ad..89d36119 100644
--- a/find-root.c
+++ b/find-root.c
@@ -30,7 +30,7 @@
/* Return value is the same as btrfs_find_root_search(). */
static int add_eb_to_result(struct extent_buffer *eb,
struct cache_tree *result,
- u32 leafsize,
+ u32 nodesize,
struct btrfs_find_root_filter *filter,
struct cache_extent **match)
{
@@ -80,7 +80,7 @@ static int add_eb_to_result(struct extent_buffer *eb,
/* Same level, insert it into the eb_tree */
if (level == gen_cache->highest_level) {
ret = add_cache_extent(&gen_cache->eb_tree,
- start, leafsize);
+ start, nodesize);
if (ret < 0 && ret != -EEXIST)
return ret;
ret = 0;
@@ -110,7 +110,7 @@ int btrfs_find_root_search(struct btrfs_fs_info *fs_info,
u64 chunk_offset = 0;
u64 chunk_size = 0;
u64 offset = 0;
- u32 leafsize = btrfs_super_leafsize(fs_info->super_copy);
+ u32 nodesize = btrfs_super_nodesize(fs_info->super_copy);
int suppress_errors = 0;
int ret = 0;
@@ -132,12 +132,12 @@ int btrfs_find_root_search(struct btrfs_fs_info *fs_info,
}
for (offset = chunk_offset;
offset < chunk_offset + chunk_size;
- offset += leafsize) {
- eb = read_tree_block_fs_info(fs_info, offset, leafsize,
+ offset += nodesize) {
+ eb = read_tree_block_fs_info(fs_info, offset, nodesize,
0);
if (!eb || IS_ERR(eb))
continue;
- ret = add_eb_to_result(eb, result, leafsize, filter,
+ ret = add_eb_to_result(eb, result, nodesize, filter,
match);
free_extent_buffer(eb);
if (ret)