btrfs: make shrink_delalloc take space_info as an arg
authorJosef Bacik <josef@toxicpanda.com>
Tue, 21 Jul 2020 14:22:15 +0000 (10:22 -0400)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:06:51 +0000 (12:06 +0200)
commit920a9958c2553e4e23f9ff42dca2907ecf9a5fa0
treea371eb453a0f87e2fa77b0c0149a885fa533cd8c
parentd7f81fac97e6d06c4e9bf090085137aa2dddff99
btrfs: make shrink_delalloc take space_info as an arg

Currently shrink_delalloc just looks up the metadata space info, but
this won't work if we're trying to reclaim space for data chunks.  We
get the right space_info we want passed into flush_space, so simply pass
that along to shrink_delalloc.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Tested-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c