f2fs: let discard thread wait a little longer if dev is busy
authorYunlei He <heyunlei@huawei.com>
Sun, 8 Apr 2018 07:11:11 +0000 (15:11 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 9 Jul 2018 00:40:58 +0000 (17:40 -0700)
commit161d1c91b80a07a3e7359dabdc803357f0909f64
treeb52b30880727820494f5285b2bed1c505798b4eb
parent4329d61ca5df7246e9048917a1767726022b7ac4
f2fs: let discard thread wait a little longer if dev is busy

This patch modify discard thread wait policy as below:
issued       io_interrupted     wait time(ms)
1.        8                 0               50
2.      (0,8)               1               50
3.        0                 1              500 (dev is busy)
4.        0                 0            60000 (no candidates)

Signed-off-by: Yunlei He <heyunlei@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/f2fs.h
fs/f2fs/segment.c