From: Greg Kroah-Hartman Date: Sat, 16 Sep 2017 01:28:37 +0000 (-0700) Subject: 4.12-stable patches X-Git-Tag: v4.9.51~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9eeb880c771b9d761b43db08958c6be3b8440c1;p=thirdparty%2Fkernel%2Fstable-queue.git 4.12-stable patches added patches: f2fs-check-hot_data-for-roll-forward-recovery.patch f2fs-let-fill_super-handle-roll-forward-errors.patch --- diff --git a/queue-4.12/f2fs-check-hot_data-for-roll-forward-recovery.patch b/queue-4.12/f2fs-check-hot_data-for-roll-forward-recovery.patch new file mode 100644 index 00000000000..ddedea95198 --- /dev/null +++ b/queue-4.12/f2fs-check-hot_data-for-roll-forward-recovery.patch @@ -0,0 +1,31 @@ +From 125c9fb1ccb53eb2ea9380df40f3c743f3fb2fed Mon Sep 17 00:00:00 2001 +From: Jaegeuk Kim +Date: Sat, 12 Aug 2017 21:33:23 -0700 +Subject: f2fs: check hot_data for roll-forward recovery + +From: Jaegeuk Kim + +commit 125c9fb1ccb53eb2ea9380df40f3c743f3fb2fed upstream. + +We need to check HOT_DATA to truncate any previous data block when doing +roll-forward recovery. + +Reviewed-by: Chao Yu +Signed-off-by: Jaegeuk Kim +Signed-off-by: Greg Kroah-Hartman + +--- + fs/f2fs/recovery.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/f2fs/recovery.c ++++ b/fs/f2fs/recovery.c +@@ -291,7 +291,7 @@ static int check_index_in_prev_nodes(str + 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]; diff --git a/queue-4.12/f2fs-let-fill_super-handle-roll-forward-errors.patch b/queue-4.12/f2fs-let-fill_super-handle-roll-forward-errors.patch new file mode 100644 index 00000000000..5e24613666e --- /dev/null +++ b/queue-4.12/f2fs-let-fill_super-handle-roll-forward-errors.patch @@ -0,0 +1,34 @@ +From afd2b4da40b3b567ef8d8e6881479345a2312a03 Mon Sep 17 00:00:00 2001 +From: Jaegeuk Kim +Date: Thu, 10 Aug 2017 17:35:04 -0700 +Subject: f2fs: let fill_super handle roll-forward errors + +From: Jaegeuk Kim + +commit afd2b4da40b3b567ef8d8e6881479345a2312a03 upstream. + +If we set CP_ERROR_FLAG in roll-forward error, f2fs is no longer to proceed +any IOs due to f2fs_cp_error(). But, for example, if some stale data is involved +on roll-forward process, we're able to get -ENOENT, getting fs stuck. +If we get any error, let fill_super set SBI_NEED_FSCK and try to recover back +to stable point. + +Reviewed-by: Chao Yu +Signed-off-by: Jaegeuk Kim +Signed-off-by: Greg Kroah-Hartman + +--- + fs/f2fs/recovery.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/fs/f2fs/recovery.c ++++ b/fs/f2fs/recovery.c +@@ -599,8 +599,6 @@ out: + } + + clear_sbi_flag(sbi, SBI_POR_DOING); +- if (err) +- set_ckpt_flags(sbi, CP_ERROR_FLAG); + mutex_unlock(&sbi->cp_mutex); + + /* let's drop all the directory inodes for clean checkpoint */ diff --git a/queue-4.12/series b/queue-4.12/series index cb6188fed7c..5264d8690e4 100644 --- a/queue-4.12/series +++ b/queue-4.12/series @@ -41,3 +41,5 @@ ip6_gre-update-mtu-properly-in-ip6gre_err.patch ipv6-fix-memory-leak-with-multiple-tables-during-netns-destruction.patch ipv6-fix-typo-in-fib6_net_exit.patch sctp-fix-missing-wake-ups-in-some-situations.patch +f2fs-let-fill_super-handle-roll-forward-errors.patch +f2fs-check-hot_data-for-roll-forward-recovery.patch