summaryrefslogtreecommitdiff
path: root/disk-io.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 /disk-io.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 'disk-io.c')
-rw-r--r--disk-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/disk-io.c b/disk-io.c
index 4302e80f..3fc58ebb 100644
--- a/disk-io.c
+++ b/disk-io.c
@@ -56,7 +56,7 @@ static int check_tree_block(struct btrfs_fs_info *fs_info,
{
struct btrfs_fs_devices *fs_devices;
- u32 leafsize = btrfs_super_leafsize(fs_info->super_copy);
+ u32 nodesize = btrfs_super_nodesize(fs_info->super_copy);
int ret = BTRFS_BAD_FSID;
if (buf->start != btrfs_header_bytenr(buf))
@@ -64,7 +64,7 @@ static int check_tree_block(struct btrfs_fs_info *fs_info,
if (btrfs_header_level(buf) >= BTRFS_MAX_LEVEL)
return BTRFS_BAD_LEVEL;
if (btrfs_header_nritems(buf) > max_nritems(btrfs_header_level(buf),
- leafsize))
+ nodesize))
return BTRFS_BAD_NRITEMS;
fs_devices = fs_info->fs_devices;
@@ -934,7 +934,7 @@ static int setup_root_or_create_block(struct btrfs_fs_info *fs_info,
{
struct btrfs_super_block *sb = fs_info->super_copy;
struct btrfs_root *root = fs_info->tree_root;
- u32 leafsize = btrfs_super_leafsize(sb);
+ u32 nodesize = btrfs_super_nodesize(sb);
int ret;
ret = find_and_setup_root(root, fs_info, objectid, info_root);
@@ -947,7 +947,7 @@ static int setup_root_or_create_block(struct btrfs_fs_info *fs_info,
* million of places that assume a root has a valid ->node
*/
info_root->node =
- btrfs_find_create_tree_block(fs_info, 0, leafsize);
+ btrfs_find_create_tree_block(fs_info, 0, nodesize);
if (!info_root->node)
return -ENOMEM;
clear_extent_buffer_uptodate(NULL, info_root->node);