summaryrefslogtreecommitdiff
path: root/fs/btrfs/space-info.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-07-15 22:45:22 +0300
committerDavid Sterba <dsterba@suse.com>2022-09-26 13:27:54 +0300
commit9d4b0a129a0d081821f21edccad154f8e2a1b747 (patch)
tree57df28bc1d9da0bcfb834002efa489eb6167d8d7 /fs/btrfs/space-info.h
parent2f12741f81af638dfb682dc2f24e6cbb67a37a2e (diff)
downloadlinux-9d4b0a129a0d081821f21edccad154f8e2a1b747.tar.xz
btrfs: simplify arguments of btrfs_update_space_info and rename
This function has grown a bunch of new arguments, and it just boils down to passing in all the block group fields as arguments. Simplify this by passing in the block group itself and updating the space_info fields based on the block group fields directly. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/space-info.h')
-rw-r--r--fs/btrfs/space-info.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/btrfs/space-info.h b/fs/btrfs/space-info.h
index 12fd6147f92d..101e83828ee5 100644
--- a/fs/btrfs/space-info.h
+++ b/fs/btrfs/space-info.h
@@ -123,10 +123,9 @@ DECLARE_SPACE_INFO_UPDATE(bytes_may_use, "space_info");
DECLARE_SPACE_INFO_UPDATE(bytes_pinned, "pinned");
int btrfs_init_space_info(struct btrfs_fs_info *fs_info);
-void btrfs_update_space_info(struct btrfs_fs_info *info, u64 flags,
- u64 total_bytes, u64 bytes_used,
- u64 bytes_readonly, u64 bytes_zone_unusable,
- bool active, struct btrfs_space_info **space_info);
+void btrfs_add_bg_to_space_info(struct btrfs_fs_info *info,
+ struct btrfs_block_group *block_group,
+ struct btrfs_space_info **space_info);
void btrfs_update_space_info_chunk_size(struct btrfs_space_info *space_info,
u64 chunk_size);
struct btrfs_space_info *btrfs_find_space_info(struct btrfs_fs_info *info,