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

Commit 97673951 authored by qixiaoyu1's avatar qixiaoyu1 Committed by Bruno Martins
Browse files

UPSTREAM: f2fs: fix wrong calculation of block age



Currently we wrongly calculate the new block age to
old * LAST_AGE_WEIGHT / 100.

Fix it to new * (100 - LAST_AGE_WEIGHT) / 100
                + old * LAST_AGE_WEIGHT / 100.

Signed-off-by: default avatarqixiaoyu1 <qixiaoyu1@xiaomi.com>
Signed-off-by: default avatarxiongping1 <xiongping1@xiaomi.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit b03a41a495df35f8e8d25220878bd6b8472d9396)
Change-Id: I989877caf2517245750e7ed809b2af71f8943f96
Signed-off-by: default avatarzhaoyuenan <amktiao030215@gmail.com>
parent 82789d67
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment