All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
@ 2015-02-10 16:41 Eric Sandeen
  2015-02-10 16:48 ` [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail Eric Sandeen
  2015-02-13  4:05 ` [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Theodore Ts'o
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Sandeen @ 2015-02-10 16:41 UTC (permalink / raw)
  To: ext4 development

commits c6d3d56d and 6b992ff2 each added the same test for, and
rejection of, changing journal_checksum during remount.  One suffices.

While we're at it, remove old comment about the "check" option
which has been deprecated for some time now.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 74c5f53..f300a56 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4845,9 +4845,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 	if (sbi->s_journal && sbi->s_journal->j_task->io_context)
 		journal_ioprio = sbi->s_journal->j_task->io_context->ioprio;
 
-	/*
-	 * Allow the "check" option to be passed as a remount option.
-	 */
 	if (!parse_options(data, sb, NULL, &journal_ioprio, 1)) {
 		err = -EINVAL;
 		goto restore_opts;
@@ -4861,14 +4858,6 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 		goto restore_opts;
 	}
 
-	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;
-	}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail
  2015-02-10 16:41 [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Eric Sandeen
@ 2015-02-10 16:48 ` Eric Sandeen
  2015-02-13  4:09   ` Theodore Ts'o
  2015-02-13  4:05 ` [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Theodore Ts'o
  1 sibling, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2015-02-10 16:48 UTC (permalink / raw)
  To: ext4 development, Cónräd

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

ALSO: Not tested.  Please double check my mad bitwise skillz to
be sure I'm re-setting the option properly.  ;)  Thanks!

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f300a56..250ad25 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4853,9 +4853,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) {

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change
  2015-02-10 16:41 [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Eric Sandeen
  2015-02-10 16:48 ` [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail Eric Sandeen
@ 2015-02-13  4:05 ` Theodore Ts'o
  1 sibling, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2015-02-13  4:05 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development

On Tue, Feb 10, 2015 at 10:41:31AM -0600, Eric Sandeen wrote:
> commits c6d3d56d and 6b992ff2 each added the same test for, and
> rejection of, changing journal_checksum during remount.  One suffices.
> 
> While we're at it, remove old comment about the "check" option
> which has been deprecated for some time now.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Applied, thanks.

					- Ted

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail
  2015-02-10 16:48 ` [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail Eric Sandeen
@ 2015-02-13  4:09   ` Theodore Ts'o
  0 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2015-02-13  4:09 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: ext4 development, Cónräd

On Tue, Feb 10, 2015 at 10:48:46AM -0600, Eric Sandeen wrote:
> 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>

Applied, thanks.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-02-13  4:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-10 16:41 [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Eric Sandeen
2015-02-10 16:48 ` [PATCH 2/2, RFC] ext4: ignore journal checksum on remount; don't fail Eric Sandeen
2015-02-13  4:09   ` Theodore Ts'o
2015-02-13  4:05 ` [PATCH 1/2] ext4: remove duplicate remount check for JOURNAL_CHECKSUM change Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.