diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-08-12 21:33:23 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-20 08:19:56 +0200 |
commit | cc9618c9fffe6bd362f048928e15effe04e5b6cd (patch) | |
tree | 302e49da53cd25551762ab681952e2ba6d539f31 /fs/f2fs | |
parent | 0f90297cba9ba37eb37723423c2df022ce77704a (diff) | |
download | linux-stable-cc9618c9fffe6bd362f048928e15effe04e5b6cd.tar.gz linux-stable-cc9618c9fffe6bd362f048928e15effe04e5b6cd.tar.bz2 linux-stable-cc9618c9fffe6bd362f048928e15effe04e5b6cd.zip |
f2fs: check hot_data for roll-forward recovery
commit 125c9fb1ccb53eb2ea9380df40f3c743f3fb2fed upstream.
We need to check HOT_DATA to truncate any previous data block when doing
roll-forward recovery.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/recovery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c index 66395f7c0309..98c1a63a4614 100644 --- a/fs/f2fs/recovery.c +++ b/fs/f2fs/recovery.c @@ -316,7 +316,7 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi, return 0; /* Get the previous summary */ - for (i = CURSEG_WARM_DATA; i <= CURSEG_COLD_DATA; i++) { + for (i = CURSEG_HOT_DATA; i <= CURSEG_COLD_DATA; i++) { struct curseg_info *curseg = CURSEG_I(sbi, i); if (curseg->segno == segno) { sum = curseg->sum_blk->entries[blkoff]; |