]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: take into account global rsv in need_preemptive_reclaim
authorJosef Bacik <josef@toxicpanda.com>
Wed, 28 Apr 2021 17:38:44 +0000 (13:38 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:04 +0000 (15:19 +0200)
commit3113a96497edec3a171b9a0380c82b342b27b925
tree82bf6343b8070932618d91e579360fdf1d6014e8
parentf27b620e13e38d428c91d81f21355e74faeeabd5
btrfs: take into account global rsv in need_preemptive_reclaim

Global rsv can't be used for normal allocations, and for very full file
systems we can decide to try and async flush constantly even though
there's really not a lot of space to reclaim.  Deal with this by
including the global block rsv size in the "total used" calculation.

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