linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ext4: explicit mount options parsing cleanup
@ 2015-10-09  9:09 Dmitry Monakhov
  2015-10-09  9:09 ` [PATCH 2/2] ext4: do not allow journal_opts for fs w/o journal Dmitry Monakhov
  2015-10-19  3:57 ` [PATCH 1/2] ext4: explicit mount options parsing cleanup Theodore Ts'o
  0 siblings, 2 replies; 5+ messages in thread
From: Dmitry Monakhov @ 2015-10-09  9:09 UTC (permalink / raw)
  To: linux-ext4; +Cc: tytso, Dmitry Monakhov

Currently MOPT_EXPLICIT treated as EXPLICIT_DELALLOC which may be changed
in future. Let's fix it now.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/ext4/super.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7ef3fa5..e91f6d4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1503,8 +1503,12 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
 		return -1;
 	if (args->from && (m->flags & MOPT_GTE0) && (arg < 0))
 		return -1;
-	if (m->flags & MOPT_EXPLICIT)
-		set_opt2(sb, EXPLICIT_DELALLOC);
+	if (m->flags & MOPT_EXPLICIT) {
+		if (m->mount_opt & EXT4_MOUNT_DELALLOC) {
+			set_opt2(sb, EXPLICIT_DELALLOC);
+		} else
+			return -1;
+	}
 	if (m->flags & MOPT_CLEAR_ERR)
 		clear_opt(sb, ERRORS_MASK);
 	if (token == Opt_noquota && sb_any_quota_loaded(sb)) {
-- 
1.7.1


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

end of thread, other threads:[~2015-10-19  3:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09  9:09 [PATCH 1/2] ext4: explicit mount options parsing cleanup Dmitry Monakhov
2015-10-09  9:09 ` [PATCH 2/2] ext4: do not allow journal_opts for fs w/o journal Dmitry Monakhov
2015-10-09 20:53   ` Andreas Dilger
2015-10-19  3:57     ` Theodore Ts'o
2015-10-19  3:57 ` [PATCH 1/2] ext4: explicit mount options parsing cleanup Theodore Ts'o

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