f2fs: split discard policy
authorChao Yu <yuchao0@huawei.com>
Wed, 4 Oct 2017 01:08:34 +0000 (09:08 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 19 Dec 2017 01:21:53 +0000 (17:21 -0800)
commit0eeceeb20671c07817afad6022da17e613481950
treea7d5868e306223ed1c4afd105a4d5d3aef5b46e7
parent775d0e58bb72fbde1f53f5d38671f8013808ad6a
f2fs: split discard policy

There are many different scenarios such as fstrim, umount, urgent or
background where we will issue discards, actually, they need use
different policy in aspect of io aware, discard granularity, delay
interval and so on. But now they just share one common discard policy,
so there will be race when changing policy in between these scenarios,
the interference of changing discard policy will be very serious.

This patch changes to split discard policy for different scenarios.

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/segment.h
fs/f2fs/sysfs.c