Fix ext4 remount with journal_checksum option (rhbz 1190933)

This commit is contained in:
Josh Boyer 2015-02-24 11:14:30 -05:00
parent 87e9e41595
commit e4d2627c99
3 changed files with 57 additions and 6 deletions

View File

@ -0,0 +1,45 @@
From: Eric Sandeen <sandeen@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@gmail.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@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

View File

@ -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@fedoraproject.org>
- Fix ext4 remount with journal_checksum option (rhbz 1190933)
* Mon Feb 23 2015 Josh Boyer <jwboyer@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)

View File

@ -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