btrfs: refactor priority_reclaim_metadata_space
authorJosef Bacik <josef@toxicpanda.com>
Thu, 1 Aug 2019 22:19:36 +0000 (18:19 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:10 +0000 (14:59 +0200)
commit9ce2f423b9463f975720782b3838640da313ecb4
tree567d77d1f495a610d270f30a2edd7a9f0e721420
parent03235279b4defc85e0e593824b27b5cf814b2fa0
btrfs: refactor priority_reclaim_metadata_space

With the eviction flushing stuff we'll want to allow for different
states, but still work basically the same way that
priority_reclaim_metadata_space works currently.  Refactor this to take
the flushing states and size as an argument so we can use the same logic
for limit flushing and eviction flushing.

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