diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-01-25 09:12:13 -0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-02-15 20:59:45 -0800 |
commit | b86232536c3ec068b0960ffc62c61a872412b2b7 (patch) | |
tree | 67137b487a8081fb7dec6d9d58a10a13681ed553 /fs/f2fs/segment.c | |
parent | db610a640eeeb268c36a4558414f28e1c269433e (diff) | |
download | linux-b86232536c3ec068b0960ffc62c61a872412b2b7.tar.bz2 |
f2fs: try to keep CP_TRIMMED_FLAG after successful umount
If every discard were issued successfully, we can avoid further discard.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r-- | fs/f2fs/segment.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index 342b720fb4db..fdd8cd21522f 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -1063,6 +1063,8 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi, } else if (discard_type == DPOLICY_UMOUNT) { dpolicy->max_requests = UINT_MAX; dpolicy->io_aware = false; + /* we need to issue all to keep CP_TRIMMED_FLAG */ + dpolicy->granularity = 1; } } |