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>
Thu, 31 May 2018 18:31:51 +0000 (11:31 -0700)
commitf9d1dced7583607e066527ee23d804478870d197
tree36e93da58dcb37530ddf0c057adf975b81922991
parent2ef79ecb5e906d87475d3e0c49b22425499a89f3
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