From 0643d71e87e5a860984ad8a43f500af8c80941d7 Mon Sep 17 00:00:00 2001 From: Chao Yu Date: Tue, 10 Apr 2018 15:43:09 +0800 Subject: [PATCH] f2fs: turn down IO priority of discard from background In order to avoid interfering normal r/w IO, let's turn down IO priority of discard issued from background. Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 7d7f7b30e5c21..37186f6e5429c 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1013,6 +1013,7 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi, dpolicy->min_interval = DEF_MIN_DISCARD_ISSUE_TIME; dpolicy->max_interval = DEF_MAX_DISCARD_ISSUE_TIME; dpolicy->io_aware = true; + dpolicy->sync = false; if (utilization(sbi) > DEF_DISCARD_URGENT_UTIL) { dpolicy->granularity = 1; dpolicy->max_interval = DEF_MIN_DISCARD_ISSUE_TIME;