Patch "f2fs: relax node version check for victim data in gc" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
f2fs: relax node version check for victim data in gc
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
f2fs-relax-node-version-check-for-victim-data-in-gc.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Mar 19 09:58:12 CET 2018
From: Jaegeuk Kim <[email protected]>
Date: Tue, 21 Mar 2017 10:59:50 -0400
Subject: f2fs: relax node version check for victim data in gc
From: Jaegeuk Kim <[email protected]>
[ Upstream commit c13ff37e359bb3eacf4e1760dcea8d9760aa7459 ]
- has_not_enough_free_secsnode_secs: 0 dent_secs: 0 freed:0 free_segments:103 reserved:104
- f2fs_gc
- get_victim_by_defaultalloc_mode 0, gc_mode 1, max_search 2672, offset 4654, ofs_unit 1
- do_garbage_collectstart_segno 3976, end_segno 3977 type 0
- is_alive
nid 22797, blkaddr 2131882, ofs_in_node 0, version 0x8/0x0
- gc_data_segment 766, segno 3976, block 512/426 not alive
So, this patch fixes subtle corrupted case where node version does not match to summary version which results in infinite loop by gc.
--- fs/f2fs/gc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/f2fs/gc.c +4 -2
@@ -522,8 +522,10 @@ static bool is_alive(struct f2fs_sb_infoget_node_info (sbi, nid, dni);if (sum->version != dni->version) { -f2fs_put_page (node_page,1 ); -return false; +f2fs_msg (sbi->sb,KERN_WARNING , +"%s: valid data with mismatched node version." , + __func__); +set_sbi_flag (sbi,SBI_NEED_FSCK ); } *nofs =ofs_of_node (node_page);
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/f2fs-relax-node-version-check-for-victim-data-in-gc.patch