]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix long latency due to discard during umount
authorSahitya Tummala <stummala@codeaurora.org>
Wed, 15 Apr 2020 09:07:53 +0000 (14:37 +0530)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 17 Apr 2020 16:17:00 +0000 (09:17 -0700)
commit77f7092cc0eb3ab09185772145ec7d8e3e5a202c
tree8779ca2b527b73136c3c4ce491e577b6fe839f87
parentcf3744a07e66a0d3d18360a683657e214b64f930
f2fs: fix long latency due to discard during umount

F2FS already has a default timeout of 5 secs for discards that
can be issued during umount, but it can take more than the 5 sec
timeout if the underlying UFS device queue is already full and there
are no more available free tags to be used. Fix this by submitting a
small batch of discard requests so that it won't cause the device
queue to be full at any time and thus doesn't incur its wait time
in the umount context.

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c