• Chao Yu's avatar
    f2fs: issue small discard by LBA order · 20ee4382
    Chao Yu authored
    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: default avatarChao Yu <yuchao0@huawei.com>
    Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
    20ee4382
f2fs.h 107 KB