From: Yunlei He Date: Wed, 4 Apr 2018 09:29:05 +0000 (+0800) Subject: f2fs: issue all big range discards in umount process X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=241b493d8fbda0ddbdcbd1e9be36c37b8a351281;p=openwrt%2Fstaging%2Fblogic.git f2fs: issue all big range discards in umount process This patch modify max_requests to UINT_MAX, to issue all big range discards in umount. Signed-off-by: Yunlei He Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index b1e58b10425f..a7ec952093f8 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -943,6 +943,7 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi, } else if (discard_type == DPOLICY_FSTRIM) { dpolicy->io_aware = false; } else if (discard_type == DPOLICY_UMOUNT) { + dpolicy->max_requests = UINT_MAX; dpolicy->io_aware = false; } }