Commit 4e55dad93ed97ddcce8f4517683cf9aafa22337b

Authored by Eric Sandeen
Committed by Greg Kroah-Hartman
1 parent a17ad4adff

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

commit 2d5b86e048780c5efa7f7d9708815555919e7b05 upstream.

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>
Cc: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Showing 1 changed file with 2 additions and 3 deletions Side-by-side Diff

... ... @@ -4849,9 +4849,8 @@
4849 4849 if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^
4850 4850 test_opt(sb, JOURNAL_CHECKSUM)) {
4851 4851 ext4_msg(sb, KERN_ERR, "changing journal_checksum "
4852   - "during remount not supported");
4853   - err = -EINVAL;
4854   - goto restore_opts;
  4852 + "during remount not supported; ignoring");
  4853 + sbi->s_mount_opt ^= EXT4_MOUNT_JOURNAL_CHECKSUM;
4855 4854 }
4856 4855  
4857 4856 if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {