]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use the filemap_fdatawrite_wbc helper for delalloc shrinking
authorJosef Bacik <josef@toxicpanda.com>
Wed, 14 Jul 2021 18:47:23 +0000 (14:47 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Aug 2021 11:19:07 +0000 (13:19 +0200)
commitfa431041a218d4102f762d5573912947f7dfe496
tree18ad0503cec1bad594e850e3c9803bd5d42fd26f
parent80e879e6764658b242f316dae1b745cc311bce0c
btrfs: use the filemap_fdatawrite_wbc helper for delalloc shrinking

sync_inode() has some holes that can cause problems if we're under heavy
ENOSPC pressure.  If there's writeback running on a separate thread
sync_inode() will skip writing the inode altogether.  What we really
want is to make sure writeback has been started on all the pages to make
sure we can see the ordered extents and wait on them if appropriate.
Switch to this new helper which will allow us to accomplish this and
avoid ENOSPC'ing early.

Reviewed-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/inode.c