]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: issue small discard by LBA order
authorChao Yu <yuchao0@huawei.com>
Sun, 8 Jul 2018 14:11:01 +0000 (22:11 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 1 Aug 2018 18:52:36 +0000 (11:52 -0700)
commita81712e9699f8617394aaab714c55273b781538b
tree0af5dd45b879666b60174389897d5b189ab56ad7
parentc436dd6578f5ff2c536fcc617405849c61d18107
f2fs: issue small discard by LBA order

For small granularity discard which size is smaller than 64KB, if we
issue those kind of discards orderly by size, their IOs will be spread
into entire logical address, so that in FTL, L2P table will be updated
randomly, result bad wear rate in the table.

In this patch, we choose to issue small discard by LBA order, by this
way, we can expect that L2P table updates from adjacent discard IOs can
be merged in the cache, so it can reduce lifetime wearing of flash.

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