Commit 2d5b86e0 authored by Eric Sandeen's avatar Eric Sandeen Committed by Theodore Ts'o

ext4: ignore journal checksum on remount; don't fail

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: default avatarCónräd <conradsand.arma@gmail.com>
Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent b94a8b36
...@@ -4858,9 +4858,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) ...@@ -4858,9 +4858,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^ if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^
test_opt(sb, JOURNAL_CHECKSUM)) { test_opt(sb, JOURNAL_CHECKSUM)) {
ext4_msg(sb, KERN_ERR, "changing journal_checksum " ext4_msg(sb, KERN_ERR, "changing journal_checksum "
"during remount not supported"); "during remount not supported; ignoring");
err = -EINVAL; sbi->s_mount_opt ^= EXT4_MOUNT_JOURNAL_CHECKSUM;
goto restore_opts;
} }
if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment