From 00eacd66cd8ab5fff9df49aa3f261ad43d495434 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 16 Jul 2011 16:46:50 -0400 Subject: ext3: make ext3 mount default to barrier=1 This patch turns on barriers by default for ext3. mount -o barrier=0 will turn them off. Based on a patch from Chris Mason in the SuSE tree. Signed-off-by: Chris Mason Signed-off-by: Christoph Hellwig Acked-by: Eric Sandeen Acked-by: Jan Kara Acked-by: Jeff Mahoney Acked-by: Ted Ts'o Signed-off-by: Al Viro --- fs/ext3/super.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') diff --git a/fs/ext3/super.c b/fs/ext3/super.c index aad153ef6b78..b57ea2f91269 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -1718,6 +1718,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) sbi->s_resuid = le16_to_cpu(es->s_def_resuid); sbi->s_resgid = le16_to_cpu(es->s_def_resgid); + /* enable barriers by default */ + set_opt(sbi->s_mount_opt, BARRIER); set_opt(sbi->s_mount_opt, RESERVATION); if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, -- cgit v1.2.3-58-ga151