Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78a402a2 authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: try to keep CP_TRIMMED_FLAG after successful umount



If every discard were issued successfully, we can avoid further discard.

Reviewed-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 26fe3e8c
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1063,6 +1063,8 @@ static void __init_discard_policy(struct f2fs_sb_info *sbi,
	} else if (discard_type == DPOLICY_UMOUNT) {
	} else if (discard_type == DPOLICY_UMOUNT) {
		dpolicy->max_requests = UINT_MAX;
		dpolicy->max_requests = UINT_MAX;
		dpolicy->io_aware = false;
		dpolicy->io_aware = false;
		/* we need to issue all to keep CP_TRIMMED_FLAG */
		dpolicy->granularity = 1;
	}
	}
}
}