f2fs: run discard jobs when put_super
authorJaegeuk Kim <jaegeuk@kernel.org>
Mon, 14 Jan 2019 18:42:11 +0000 (10:42 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 4 Feb 2019 16:55:34 +0000 (08:55 -0800)
commit03f2c02d8be76d2080c174cd65d2dfcbbf783708
treec158cbf3adba51bcd4724e7f0e4cef75fb39b365
parent2010987365ab3b381df20bb6f175b59551cfe67d
f2fs: run discard jobs when put_super

When we umount f2fs, we need to avoid long delay due to discard commands, which
is actually taking tens of seconds, if storage is very slow on UNMAP. So, this
patch introduces timeout-based work on it.

By default, let me give 5 seconds for discard.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Documentation/ABI/testing/sysfs-fs-f2fs
fs/f2fs/f2fs.h
fs/f2fs/segment.c
fs/f2fs/super.c
fs/f2fs/sysfs.c