Commit 83d731a5 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba
Browse files

btrfs: unexport can_overcommit

Now that we've moved all of the users to space-info.c, unexport it and
name it back to can_overcommit.

Reviewed-by: default avatarNikolay Borisov <>
Signed-off-by: default avatarJosef Bacik <>
Signed-off-by: default avatarDavid Sterba <>
parent 0d9764f6
......@@ -182,7 +182,7 @@ static inline u64 calc_global_rsv_need_space(struct btrfs_block_rsv *global)
return (global->size << 1);
int btrfs_can_overcommit(struct btrfs_fs_info *fs_info,
static int can_overcommit(struct btrfs_fs_info *fs_info,
struct btrfs_space_info *space_info, u64 bytes,
enum btrfs_reserve_flush_enum flush,
bool system_chunk)
......@@ -279,8 +279,7 @@ again:
* adding the ticket space would be a double count.
if (check_overcommit &&
!btrfs_can_overcommit(fs_info, space_info, 0, flush,
!can_overcommit(fs_info, space_info, 0, flush, false))
if (num_bytes >= ticket->bytes) {
......@@ -724,13 +723,13 @@ btrfs_calc_reclaim_metadata_size(struct btrfs_fs_info *fs_info,
return to_reclaim;
to_reclaim = min_t(u64, num_online_cpus() * SZ_1M, SZ_16M);
if (btrfs_can_overcommit(fs_info, space_info, to_reclaim,
if (can_overcommit(fs_info, space_info, to_reclaim,
return 0;
used = btrfs_space_info_used(space_info, true);
if (btrfs_can_overcommit(fs_info, space_info, SZ_1M,
if (can_overcommit(fs_info, space_info, SZ_1M,
expected = div_factor_fine(space_info->total_bytes, 95);
......@@ -978,7 +977,7 @@ static int __reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
trace_btrfs_space_reservation(fs_info, "space_info",
space_info->flags, orig_bytes, 1);
ret = 0;
} else if (btrfs_can_overcommit(fs_info, space_info, orig_bytes, flush,
} else if (can_overcommit(fs_info, space_info, orig_bytes, flush,
system_chunk)) {
btrfs_space_info_update_bytes_may_use(fs_info, space_info,
......@@ -122,10 +122,6 @@ struct btrfs_space_info *btrfs_find_space_info(struct btrfs_fs_info *info,
u64 btrfs_space_info_used(struct btrfs_space_info *s_info,
bool may_use_included);
void btrfs_clear_space_info_full(struct btrfs_fs_info *info);
int btrfs_can_overcommit(struct btrfs_fs_info *fs_info,
struct btrfs_space_info *space_info, u64 bytes,
enum btrfs_reserve_flush_enum flush,
bool system_chunk);
void btrfs_dump_space_info(struct btrfs_fs_info *fs_info,
struct btrfs_space_info *info, u64 bytes,
int dump_block_groups);
Supports Markdown
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