diff options
author | Josef Bacik <josef@toxicpanda.com> | 2021-11-09 10:12:05 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-01-03 15:09:45 +0100 |
commit | 6dbdd578cd4fcb88ad9e57777a140e3349323e28 (patch) | |
tree | 40784ce5b988ec4b7c19bb39063def721b345c1b /fs/btrfs/space-info.c | |
parent | ee6adbfd6a2c15a71fb26d9321c97bef09ae0534 (diff) |
btrfs: remove global rsv stealing logic for orphan cleanup
This is very old code before we were stealing from the global reserve
during evict. We have proper ways to steal from the global reserve
while we're evicting, so rip out this code as it's no longer necessary.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/space-info.c')
-rw-r--r-- | fs/btrfs/space-info.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index a546cd411de4..d277c7111b95 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -1606,16 +1606,9 @@ int btrfs_reserve_metadata_bytes(struct btrfs_root *root, enum btrfs_reserve_flush_enum flush) { struct btrfs_fs_info *fs_info = root->fs_info; - struct btrfs_block_rsv *global_rsv = &fs_info->global_block_rsv; int ret; ret = __reserve_bytes(fs_info, block_rsv->space_info, orig_bytes, flush); - if (ret == -ENOSPC && - unlikely(root->orphan_cleanup_state == ORPHAN_CLEANUP_STARTED)) { - if (block_rsv != global_rsv && - !btrfs_block_rsv_use_bytes(global_rsv, orig_bytes)) - ret = 0; - } if (ret == -ENOSPC) { trace_btrfs_space_reservation(fs_info, "space_info:enospc", block_rsv->space_info->flags, |