summaryrefslogtreecommitdiff
path: root/utils.h
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 /utils.h
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 'utils.h')
-rw-r--r--utils.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils.h b/utils.h
index 9e890f90..f13f62fd 100644
--- a/utils.h
+++ b/utils.h
@@ -191,7 +191,7 @@ int get_device_info(int fd, u64 devid,
struct btrfs_ioctl_dev_info_args *di_args);
u64 get_partition_size(const char *dev);
-int test_minimum_size(const char *file, u32 leafsize);
+int test_minimum_size(const char *file, u32 nodesize);
int test_issubvolname(const char *name);
int test_issubvolume(const char *path);
int test_isdir(const char *path);
@@ -209,14 +209,14 @@ int get_subvol_info(const char *fullpath, struct root_info *get_ri);
* To avoid the overkill calculation, (system group + global block rsv) * 2
* for *EACH* device should be good enough.
*/
-static inline u64 btrfs_min_global_blk_rsv_size(u32 leafsize)
+static inline u64 btrfs_min_global_blk_rsv_size(u32 nodesize)
{
- return leafsize << 10;
+ return nodesize << 10;
}
-static inline u64 btrfs_min_dev_size(u32 leafsize)
+static inline u64 btrfs_min_dev_size(u32 nodesize)
{
return 2 * (BTRFS_MKFS_SYSTEM_GROUP_SIZE +
- btrfs_min_global_blk_rsv_size(leafsize));
+ btrfs_min_global_blk_rsv_size(nodesize));
}
int find_next_key(struct btrfs_path *path, struct btrfs_key *key);