]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit677d351d3e332864fdf7222ff70f5106c0a71f5f
treec158cbf3adba51bcd4724e7f0e4cef75fb39b365
parent1b7e9b78270dbc852ba3b308f8ea7e2c59f4f824
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