1 ext4: disallow changing journal_csum option during remount
3 From: "Darrick J. Wong" <darrick.wong@oracle.com>
5 ext4 does not permit changing the metadata or journal checksum feature
6 flag while mounted. Until we decide to support that, don't allow a
7 remount to change the journal_csum flag (right now we silently fail to
10 Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
11 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
13 fs/ext4/super.c | 8 ++++++++
14 1 file changed, 8 insertions(+)
17 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
18 index 5c11e21..96059e0 100644
21 @@ -4845,6 +4845,14 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
25 + if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^
26 + test_opt(sb, JOURNAL_CHECKSUM)) {
27 + ext4_msg(sb, KERN_ERR, "changing journal_checksum "
28 + "during remount not supported");
33 if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) {
34 if (test_opt2(sb, EXPLICIT_DELALLOC)) {
35 ext4_msg(sb, KERN_ERR, "can't mount with "