f2fs: support issuing/waiting discard in range
commit8412663d177d95beff799c8bb256fccef86d09e6
authorChao Yu <yuchao0@huawei.com>
Wed, 4 Oct 2017 01:08:32 +0000 (4 09:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 26 Oct 2017 08:44:06 +0000 (26 10:44 +0200)
tree7cf0629d2d813970d3621bb263f72a5fd8d6c49f
parent1228b482c4ee26f3334dd83eb13bcf7e462f9c93
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