OSDN Git Service

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>
Mon, 13 Aug 2018 17:48:17 +0000 (10:48 -0700)
commit35ec7d5748849762008e8ae9f8ad2766229d5794
tree0038876fb5399028e19155c391efe79cd5b994cb
parenta690efffd16302d23b0bbd00f84dcedc11935a8b
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