f2fs: split discard command in prior to block layer
authorChao Yu <yuchao0@huawei.com>
Mon, 6 Aug 2018 14:43:50 +0000 (22:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 5 Sep 2018 22:20:48 +0000 (15:20 -0700)
commit4ac6304174f396ab83474fd7eb1f1a6772ba02bf
tree8d0ca24a03f8cdfd3ea3c0b91bd6672b95c80e42
parentd89f355377080a2ec464f264eecf8ca5bb567f89
f2fs: split discard command in prior to block layer

Some devices has small max_{hw,}discard_sectors, so that in
__blkdev_issue_discard(), one big size discard bio can be split
into multiple small size discard bios, result in heavy load in IO
scheduler and device, which can hang other sync IO for long time.

Now, f2fs is trying to control discard commands more elaboratively,
in order to make less conflict in between discard IO and user IO
to enhance application's performance, so in this patch, we will
split discard bio in f2fs in prior to in block layer to reduce
issuing multiple discard bios in a short time.

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