]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: flush background discard kwork when retry allocation
authorWang Jianchao <wangjianchao@kuaishou.com>
Mon, 30 Aug 2021 07:52:46 +0000 (15:52 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 31 Aug 2021 03:35:53 +0000 (23:35 -0400)
commit025d7f511bae1f4f34ccba5b04fd8711b6720d3b
tree6faf71ad1579daab0cfca48cdac8b85388b88158
parent6b7f2dc97dfa4c5e97dfd544abe4626d13ecf4e2
ext4: flush background discard kwork when retry allocation

The background discard kwork tries to mark blocks used and issue
discard. This can make filesystem suffer from NOSPC error, xfstest
generic/371 can fail due to it. Fix it by flushing discard kwork
in ext4_should_retry_alloc. At the same time, give up discard at
the moment.

Signed-off-by: Wang Jianchao <wangjianchao@kuaishou.com>
Link: https://lore.kernel.org/r/20210830075246.12516-6-jianchao.wan9@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/balloc.c
fs/ext4/ext4.h
fs/ext4/mballoc.c