[kernel/f20] Fix ext4 remount with journal_checksum option (rhbz 1190933)

Josh Boyer jwboyer at fedoraproject.org
Tue Feb 24 16:14:44 UTC 2015


commit e4d2627c997ca3b119b759c7b7d4d88c30cc0dda
Author: Josh Boyer <jwboyer at fedoraproject.org>
Date:   Tue Feb 24 11:14:30 2015 -0500

    Fix ext4 remount with journal_checksum option (rhbz 1190933)

 ...re-journal-checksum-on-remount-don-t-fail.patch | 45 ++++++++++++++++++++++
 kernel.spec                                        |  9 +++++
 rebase-notes.txt                                   |  9 ++---
 3 files changed, 57 insertions(+), 6 deletions(-)
---
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 <sandeen at redhat.com>
+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 <conradsand.arma at gmail.com>
+Signed-off-by: Eric Sandeen <sandeen at redhat.com>
+Signed-off-by: Theodore Ts'o <tytso at mit.edu>
+---
+ 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 853aa13..8cf5ce6 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -770,6 +770,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
@@ -1503,6 +1506,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.
@@ -2321,6 +2327,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
+* Tue Feb 24 2015 Josh Boyer <jwboyer at fedoraproject.org>
+- Fix ext4 remount with journal_checksum option (rhbz 1190933)
+
 * Mon Feb 23 2015 Josh Boyer <jwboyer at fedoraproject.org>
 - 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


More information about the scm-commits mailing list