Commit c065f5b1 authored by Su Yue's avatar Su Yue Committed by David Sterba

btrfs: rename btrfs_get_block_group_info and make it static

The function btrfs_get_block_group_info() was introduced by the
commit 5af3e8cc ("Btrfs: make filesystem read-only when submitting
 barrier fails") which used it in disk-io.c.

However, the function is only called in ioctl.c now.
Its parameter type btrfs_ioctl_space_info* is only for ioctl.

So, make it static and rename it to be original name
get_block_group_info.

No functional change.
Signed-off-by: default avatarSu Yue <suy.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 29d2b84c
...@@ -3267,8 +3267,6 @@ int btrfs_is_empty_uuid(u8 *uuid); ...@@ -3267,8 +3267,6 @@ int btrfs_is_empty_uuid(u8 *uuid);
int btrfs_defrag_file(struct inode *inode, struct file *file, int btrfs_defrag_file(struct inode *inode, struct file *file,
struct btrfs_ioctl_defrag_range_args *range, struct btrfs_ioctl_defrag_range_args *range,
u64 newer_than, unsigned long max_pages); u64 newer_than, unsigned long max_pages);
void btrfs_get_block_group_info(struct list_head *groups_list,
struct btrfs_ioctl_space_info *space);
void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock, void update_ioctl_balance_args(struct btrfs_fs_info *fs_info, int lock,
struct btrfs_ioctl_balance_args *bargs); struct btrfs_ioctl_balance_args *bargs);
ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen, ssize_t btrfs_dedupe_file_range(struct file *src_file, u64 loff, u64 olen,
......
...@@ -4007,7 +4007,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp) ...@@ -4007,7 +4007,7 @@ static long btrfs_ioctl_default_subvol(struct file *file, void __user *argp)
return ret; return ret;
} }
void btrfs_get_block_group_info(struct list_head *groups_list, static void get_block_group_info(struct list_head *groups_list,
struct btrfs_ioctl_space_info *space) struct btrfs_ioctl_space_info *space)
{ {
struct btrfs_block_group_cache *block_group; struct btrfs_block_group_cache *block_group;
...@@ -4124,8 +4124,8 @@ static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info, ...@@ -4124,8 +4124,8 @@ static long btrfs_ioctl_space_info(struct btrfs_fs_info *fs_info,
down_read(&info->groups_sem); down_read(&info->groups_sem);
for (c = 0; c < BTRFS_NR_RAID_TYPES; c++) { for (c = 0; c < BTRFS_NR_RAID_TYPES; c++) {
if (!list_empty(&info->block_groups[c])) { if (!list_empty(&info->block_groups[c])) {
btrfs_get_block_group_info( get_block_group_info(&info->block_groups[c],
&info->block_groups[c], &space); &space);
memcpy(dest, &space, sizeof(space)); memcpy(dest, &space, sizeof(space));
dest++; dest++;
space_args.total_spaces++; space_args.total_spaces++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment