f2fs: support issuing/waiting discard in range
authorChao Yu <yuchao0@huawei.com>
Wed, 4 Oct 2017 01:08:32 +0000 (09:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 01:21:51 +0000 (17:21 -0800)
commit77b5bf3aaf14da0dc701788179761fa5eeef352f
tree3aada79b6a085ea50e595f29fbb144ad394549b8
parent6b50d3ec7d114ea78319b046ab878cfee7d0cc33
f2fs: support issuing/waiting discard in range

Fstrim intends to trim invalid blocks of filesystem only with specified
range and granularity, but actually, it will issue all previous cached
discard commands which may be out-of-range and be with unmatched
granularity, it's unneeded.

In order to fix above issues, this patch introduces new helps to support
to issue and wait discard in range and adds a new fstrim_list for tracking
in-flight discard from ->fstrim.

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