diff mbox

[1/2] ext3: make ext3 mount default to barrier=1

Message ID 20110711182558.GB12099@infradead.org
State Not Applicable, archived
Headers show

Commit Message

Christoph Hellwig July 11, 2011, 6:25 p.m. UTC
From: Chris Mason <mason@suse.com>

This patch turns on barriers by default for ext3.  mount -o barrier=0
will turn them off.

Acked-by: Jeff Mahoney <jeffm@suse.com>

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

Comments

Jan Kara July 11, 2011, 7:17 p.m. UTC | #1
On Mon 11-07-11 14:25:59, Christoph Hellwig wrote:
> From: Chris Mason <mason@suse.com>
> 
> This patch turns on barriers by default for ext3.  mount -o barrier=0
> will turn them off.
> 
> Acked-by: Jeff Mahoney <jeffm@suse.com>
  This patch misses signed-off-by. Feel free to add
Acked-by: Jan Kara <jack@suse.cz>

								Honza
 
> Index: linux-2.6/fs/ext3/super.c
> ===================================================================
> --- linux-2.6.orig/fs/ext3/super.c	2011-06-30 21:19:37.389544975 +0200
> +++ linux-2.6/fs/ext3/super.c	2011-07-02 13:56:51.877784292 +0200
> @@ -1718,6 +1718,8 @@ static int ext3_fill_super (struct super
>  	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,
Christoph Hellwig July 11, 2011, 7:20 p.m. UTC | #2
On Mon, Jul 11, 2011 at 09:17:35PM +0200, Jan Kara wrote:
> On Mon 11-07-11 14:25:59, Christoph Hellwig wrote:
> > From: Chris Mason <mason@suse.com>
> > 
> > This patch turns on barriers by default for ext3.  mount -o barrier=0
> > will turn them off.
> > 
> > Acked-by: Jeff Mahoney <jeffm@suse.com>
>   This patch misses signed-off-by. Feel free to add
> Acked-by: Jan Kara <jack@suse.cz>

I took it from the SuSE tree where it didn't have one either.  I hope
Jeff can add one, but if not I think it's trivial enough to bother.

--
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
Theodore Ts'o July 11, 2011, 10:23 p.m. UTC | #3
On Mon, Jul 11, 2011 at 09:17:35PM +0200, Jan Kara wrote:
> On Mon 11-07-11 14:25:59, Christoph Hellwig wrote:
> > From: Chris Mason <mason@suse.com>
> > 
> > This patch turns on barriers by default for ext3.  mount -o barrier=0
> > will turn them off.
> > 
> > Acked-by: Jeff Mahoney <jeffm@suse.com>
>   This patch misses signed-off-by. Feel free to add
> Acked-by: Jan Kara <jack@suse.cz>

I'm also completely in favor of this change.

    	 	       	     	     - 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
Eric Sandeen July 12, 2011, 12:16 a.m. UTC | #4
On 7/11/11 1:25 PM, Christoph Hellwig wrote:
> From: Chris Mason <mason@suse.com>
> 
> This patch turns on barriers by default for ext3.  mount -o barrier=0
> will turn them off.
> 
> Acked-by: Jeff Mahoney <jeffm@suse.com>
> 
> Index: linux-2.6/fs/ext3/super.c
> ===================================================================
> --- linux-2.6.orig/fs/ext3/super.c	2011-06-30 21:19:37.389544975 +0200
> +++ linux-2.6/fs/ext3/super.c	2011-07-02 13:56:51.877784292 +0200
> @@ -1718,6 +1718,8 @@ static int ext3_fill_super (struct super
>  	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,

Thank you, I hope it will get upstream THIS time ;)

As Jan said, despite uptream rejection last time, RHEL6 and SuSE have made this change anyway, because it's the Right Thing To Do.

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

-Eric
--
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
Chris Mason July 12, 2011, 1:24 p.m. UTC | #5
Excerpts from Christoph Hellwig's message of 2011-07-11 14:25:59 -0400:
> From: Chris Mason <mason@suse.com>
> 

Thanks for digging this out, you can toss in a sob for me.  Probably
best to give yourself credit in the from:, since you went to all the
trouble of diving in the vendor kernels.

Then again, if you're using the old email to try and throw Andrew off
our trail, go for it.

-chris

> This patch turns on barriers by default for ext3.  mount -o barrier=0
> will turn them off.
> 
> Acked-by: Jeff Mahoney <jeffm@suse.com>
> 
> Index: linux-2.6/fs/ext3/super.c
> ===================================================================
> --- linux-2.6.orig/fs/ext3/super.c    2011-06-30 21:19:37.389544975 +0200
> +++ linux-2.6/fs/ext3/super.c    2011-07-02 13:56:51.877784292 +0200
> @@ -1718,6 +1718,8 @@ static int ext3_fill_super (struct super
>      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,
--
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
Christoph Hellwig July 14, 2011, 3:19 p.m. UTC | #6
On Tue, Jul 12, 2011 at 09:24:47AM -0400, Chris Mason wrote:
> Excerpts from Christoph Hellwig's message of 2011-07-11 14:25:59 -0400:
> > From: Chris Mason <mason@suse.com>
> > 
> 
> Thanks for digging this out, you can toss in a sob for me.  Probably
> best to give yourself credit in the from:, since you went to all the
> trouble of diving in the vendor kernels.
> 
> Then again, if you're using the old email to try and throw Andrew off
> our trail, go for it.

Given that it's trivial one liners, and suse actually had config options
around them that I had to remove I might as well claim the patches as
mine.  I'll resend them with my From and Signoff lines.

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

Patch

Index: linux-2.6/fs/ext3/super.c
===================================================================
--- linux-2.6.orig/fs/ext3/super.c	2011-06-30 21:19:37.389544975 +0200
+++ linux-2.6/fs/ext3/super.c	2011-07-02 13:56:51.877784292 +0200
@@ -1718,6 +1718,8 @@  static int ext3_fill_super (struct super
 	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,