]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: reduce the preemptive flushing threshold to 90%
authorJosef Bacik <josef@toxicpanda.com>
Wed, 11 Aug 2021 18:37:15 +0000 (14:37 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:15 +0000 (13:19 +0200)
commit2ada25f778b5947683c54efaf10aea025ef28770
tree2e526dc474fbe23434c1bd9628a6a681b2954ee9
parent25a445366c76d0018043f4e4aabb13509311d62c
btrfs: reduce the preemptive flushing threshold to 90%

The preemptive flushing code was added in order to avoid needing to
synchronously wait for ENOSPC flushing to recover space.  Once we're
almost full however we can essentially flush constantly.  We were using
98% as a threshold to determine if we were simply full, however in
practice this is a really high bar to hit.  For example reports of
systems running into this problem had around 94% usage and thus
continued to flush.  Fix this by lowering the threshold to 90%, which is
a more sane value, especially for smaller file systems.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=212185
CC: stable@vger.kernel.org # 5.12+
Fixes: e17432c33757 ("btrfs: improve preemptive background space flushing")
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/space-info.c