OSDN Git Service

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>
Thu, 26 Oct 2017 08:44:08 +0000 (10:44 +0200)
commit78997b569f5625f2762b3c4e743c33becdd5d99d
tree47662630449ff77dd02e0c4ef08ee5777079ba3e
parentecc9aa00dbb10416d3c1d8ef44ee38d20a36d172
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