From 06c1c91aad66257ac378323c6eb2a5b8b66e517e Mon Sep 17 00:00:00 2001 From: Josh Boyer Date: Feb 24 2015 16:14:30 +0000 Subject: Fix ext4 remount with journal_checksum option (rhbz 1190933) --- diff --git a/ext4-ignore-journal-checksum-on-remount-don-t-fail.patch b/ext4-ignore-journal-checksum-on-remount-don-t-fail.patch new file mode 100644 index 0000000..6a52e78 --- /dev/null +++ b/ext4-ignore-journal-checksum-on-remount-don-t-fail.patch @@ -0,0 +1,45 @@ +From: Eric Sandeen +Date: Thu, 12 Feb 2015 23:07:37 -0500 +Subject: [PATCH] ext4: ignore journal checksum on remount; don't fail +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As of v3.18, ext4 started rejecting a remount which changes the +journal_checksum option. + +Prior to that, it was simply ignored; the problem here is that +if someone has this in their fstab for the root fs, now the box +fails to boot properly, because remount of root with the new options +will fail, and the box proceeds with a readonly root. + +I think it is a little nicer behavior to accept the option, but +warn that it's being ignored, rather than failing the mount, +but that might be a subjective matter... + +Reported-by: Cónräd +Signed-off-by: Eric Sandeen +Signed-off-by: Theodore Ts'o +--- + fs/ext4/super.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/fs/ext4/super.c b/fs/ext4/super.c +index 2c9e6864abd9..fc7391e14c2a 100644 +--- a/fs/ext4/super.c ++++ b/fs/ext4/super.c +@@ -4849,9 +4849,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) + if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^ + test_opt(sb, JOURNAL_CHECKSUM)) { + ext4_msg(sb, KERN_ERR, "changing journal_checksum " +- "during remount not supported"); +- err = -EINVAL; +- goto restore_opts; ++ "during remount not supported; ignoring"); ++ sbi->s_mount_opt ^= EXT4_MOUNT_JOURNAL_CHECKSUM; + } + + if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { +-- +2.1.0 + diff --git a/kernel.spec b/kernel.spec index a67ea61..6111330 100644 --- a/kernel.spec +++ b/kernel.spec @@ -653,6 +653,9 @@ Patch26138: ext4-Allocate-entire-range-in-zero-range.patch #rhbz 1188439 Patch26139: HID-i2c-hid-Limit-reads-to-wMaxInputLength-bytes-for.patch +#rhbz 1190933 +Patch26140: ext4-ignore-journal-checksum-on-remount-don-t-fail.patch + # END OF PATCH DEFINITIONS %endif @@ -1411,6 +1414,9 @@ ApplyPatch ext4-Allocate-entire-range-in-zero-range.patch #rhbz 1188439 ApplyPatch HID-i2c-hid-Limit-reads-to-wMaxInputLength-bytes-for.patch +#rhbz 1190933 +ApplyPatch ext4-ignore-journal-checksum-on-remount-don-t-fail.patch + %if 0%{?aarch64patches} ApplyPatch kernel-arm64.patch %ifnarch aarch64 # this is stupid, but i want to notice before secondary koji does. @@ -2281,6 +2287,9 @@ fi # ||----w | # || || %changelog +* Tue Feb 24 2015 Josh Boyer +- Fix ext4 remount with journal_checksum option (rhbz 1190933) + * Mon Feb 23 2015 Josh Boyer - Add patch for HID i2c from Seth Forshee (rhbz 1188439) - CVE-2015-0275 ext4: fallocate zero range page size > block size BUG (rhbz 1193907 1195178) diff --git a/rebase-notes.txt b/rebase-notes.txt index 39029bb..23254d2 100644 --- a/rebase-notes.txt +++ b/rebase-notes.txt @@ -1,7 +1,4 @@ -Linux 3.4 rebase notes: +Linux 3.19 rebase notes: -* Look at the CPU modalias patches from Andi. See if they are sufficient to - build the cpufreq drivers as modules again (rhbz 713572 but mostly to just - make this person in IRC be quiet) - -* Make sure X32 stays disabled. Preferably forever +- ext4-ignore-journal-checksum-on-remount-don-t-fail.patch needs to stay applied + until it gets into stable