]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: wait between incomplete batch memory allocations
authorSweet Tea Dorminy <sweettea-kernel@dorminy.me>
Wed, 6 Apr 2022 18:24:18 +0000 (14:24 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 16 May 2022 15:03:11 +0000 (17:03 +0200)
commit940a506f5c1e7abe09a6b26085b658492501424c
tree7c1487af39bc4fd0aad7bd56d802e20974141f9a
parentbd1d4c53e885b5ac8518c0a4793093add0c2ac29
btrfs: wait between incomplete batch memory allocations

When allocating memory in a loop, each iteration should call
memalloc_retry_wait() in order to prevent starving memory-freeing
processes (and to mark where allocation loops are). Other filesystems do
that as well.

The bulk page allocation is the only place in btrfs with an allocation
retry loop, so add an appropriate call to it.

Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c