FAILED: patch "[PATCH] ext4: don't remount read-only with errors=continue on reboot" failed to apply to 5.4-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 5.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b08070eca9e247f60ab39d79b2c25d274750441f Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Fri, 27 Nov 2020 12:33:54 +0100
Subject: [PATCH] ext4: don't remount read-only with errors=continue on reboot
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
fs/ext4/super.c +6 -8
@@ -666,19 +666,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -ext4_set_mount_flag (sb,EXT4_MF_FS_ABORTED ); -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +ext4_set_mount_flag (sb,EXT4_MF_FS_ABORTED ); +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
PATCH v2 1/1 ext4: don't remount read-only with errors=continue on reboot
From: Jan Kara <[email protected]>
commit b08070eca9e247f60ab39d79b2c25d274750441f upstream.
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
[jinoh: backport accounting for missing
commit 9b5f6c9b83d9 ("ext4: make s_mount_flags modifications atomic")]
---
v1 --> v2: added missing comment and signoff
Apologies for wasted traffic...
Please disregard the previous mail, which was in a wrong thread:
- <[email protected]> [PATCH 5.4 bp] That said, the patches for 4.19 and 5.4 have the same patch ID.
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
fs/ext4/super.c +6 -8
@@ -455,19 +455,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
Signature · 1 line
2.26.2
Jan Kara
reviewerRe: [PATCH 5.4 bp v2] ext4: don't remount read-only with errors=continue on reboot
Quoted 15 lines · Jinoh Kang
From: Jan Kara <[email protected]>
commit
b08070eca9e247f60ab39d79b2c25d274750441fupstream.
ext4_handle_error()with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.Fixes 1dc1097ff60e ("ext4: avoid panic during forced reboot")Signed-off-by Jan Kara <[email protected]>Reviewed-by Andreas Dilger <[email protected]>Signed-off-by Theodore Ts'o <[email protected]>[jinoh: backport accounting for missing
commit9b5f6c9b83d9("ext4: makes_mount_flagsmodifications atomic")]
Quoted 8 lines
Signed-off-by Jinoh Kang <[email protected]>---
v1 --> v2: added missing comment and signoff
Apologies for wasted traffic...Please disregard the previous mail, which was in a wrong thread:
- <[email protected]> [PATCH 5.4 bp] That said, the patches for 4.19 and 5.4 have the same patch ID.
The backport looks good to me. Thanks!
Honza
Quoted 37 lines
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)fs/ext4/super.c +6
-8@@ -455,19 +455,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already Signature · 1 line
2.26.2
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR
[email protected]
maintainerFAILED: patch "[PATCH] ext4: don't remount read-only with errors=continue on reboot" failed to apply to 4.19-stable tree
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b08070eca9e247f60ab39d79b2c25d274750441f Mon Sep 17 00:00:00 2001
From: Jan Kara <[email protected]>
Date: Fri, 27 Nov 2020 12:33:54 +0100
Subject: [PATCH] ext4: don't remount read-only with errors=continue on reboot
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
fs/ext4/super.c +6 -8
@@ -666,19 +666,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -ext4_set_mount_flag (sb,EXT4_MF_FS_ABORTED ); -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +ext4_set_mount_flag (sb,EXT4_MF_FS_ABORTED ); +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
PATCH 1/1 ext4: don't remount read-only with errors=continue on reboot
From: Jan Kara <[email protected]>
commit b08070eca9e247f60ab39d79b2c25d274750441f upstream.
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
fs/ext4/super.c +6 -8
@@ -455,19 +455,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
Signature · 1 line
2.26.2
PATCH 1/1 ext4: don't remount read-only with errors=continue on reboot
In reply to [email protected]From: Jan Kara <[email protected]>
commit b08070eca9e247f60ab39d79b2c25d274750441f upstream.
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
fs/ext4/super.c +6 -8
@@ -454,19 +454,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
Signature · 1 line
2.26.2
PATCH v2 1/1 ext4: don't remount read-only with errors=continue on reboot
From: Jan Kara <[email protected]>
commit b08070eca9e247f60ab39d79b2c25d274750441f upstream.
ext4_handle_error() with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.
[jinoh: backport accounting for missing
commit 9b5f6c9b83d9 ("ext4: make s_mount_flags modifications atomic")]
---
v1 --> v2: added missing comment and signoff
Apologies for wasted traffic...
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)
fs/ext4/super.c +6 -8
@@ -454,19 +454,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already
Signature · 1 line
2.26.2
Jan Kara
reviewerRe: [PATCH 4.19 bp v2] ext4: don't remount read-only with errors=continue on reboot
Quoted 13 lines · Jinoh Kang
From: Jan Kara <[email protected]>
commit
b08070eca9e247f60ab39d79b2c25d274750441fupstream.
ext4_handle_error()with errors=continue mount option can accidentally remount the filesystem read-only when the system is rebooting. Fix that.Fixes 1dc1097ff60e ("ext4: avoid panic during forced reboot")Signed-off-by Jan Kara <[email protected]>Reviewed-by Andreas Dilger <[email protected]>Signed-off-by Theodore Ts'o <[email protected]>
Quoted 6 lines
[jinoh: backport accounting for missing
commit9b5f6c9b83d9("ext4: makes_mount_flagsmodifications atomic")]Signed-off-by Jinoh Kang <[email protected]>---
v1 --> v2: added missing comment and signoff
Apologies for wasted traffic...
The backport looks good to me.
Honza
Quoted 37 lines
--- fs/ext4/super.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-)fs/ext4/super.c +6
-8@@ -454,19 +454,17 @@ static bool system_going_down(void)static void ext4_handle_error (struct super_block *sb) { +journal_t *journal =EXT4_SB (sb)->s_journal; +if (test_opt (sb,WARN_ON_ERROR ))WARN_ON_ONCE (1 ); -if (sb_rdonly (sb)) +if (sb_rdonly (sb) ||test_opt (sb,ERRORS_CONT ))return ; -if (!test_opt (sb,ERRORS_CONT )) { -journal_t *journal =EXT4_SB (sb)->s_journal; - -EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; -if (journal) -jbd2_journal_abort (journal, -EIO ); - } +EXT4_SB (sb)->s_mount_flags |=EXT4_MF_FS_ABORTED ; +if (journal) +jbd2_journal_abort (journal, -EIO );/* * We force ERRORS_RO behavior when system is rebooting. Otherwise we * could panic during 'reboot -f' as the underlying device got already Signature · 1 line
2.26.2
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR