From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: tytso@mit.edu, darrick.wong@oracle.com
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH 2/3] Subject: [PATCH] ext4: disallow changing journal_csum option during remount
Date: Mon, 27 Oct 2014 18:19:29 -0700 [thread overview]
Message-ID: <20141028011929.30103.67158.stgit@birch.djwong.org> (raw)
In-Reply-To: <20141028011916.30103.50751.stgit@birch.djwong.org>
ext4 does not permit changing the metadata or journal checksum feature
flag while mounted. Until we decide to support that, don't allow a
remount to change the journal_csum flag (right now we silently fail to
change anything).
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/ext4/super.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 5c11e21..96059e0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4845,6 +4845,14 @@ 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;
+ }
+
if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
if (test_opt2(sb, EXPLICIT_DELALLOC)) {
ext4_msg(sb, KERN_ERR, "can't mount with "
next prev parent reply other threads:[~2014-10-28 1:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-28 1:19 [PATCH 0/3] ext4: misc 3.18-rc2 bugfixes Darrick J. Wong
2014-10-28 1:19 ` [PATCH 1/3] ext4: enable journal checksum when metadata checksum feature enabled Darrick J. Wong
2014-10-29 1:58 ` Theodore Ts'o
2014-10-28 1:19 ` Darrick J. Wong [this message]
2014-10-29 2:20 ` [PATCH 2/3] Subject: [PATCH] ext4: disallow changing journal_csum option during remount Theodore Ts'o
2014-10-28 1:19 ` [PATCH 3/3] ext4: remove extent status procfs files if journal load fails Darrick J. Wong
2014-10-29 2:20 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141028011929.30103.67158.stgit@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).