All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] always default to issue cache flushes
@ 2011-07-11 18:25 Christoph Hellwig
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-07-11 18:25 UTC (permalink / raw)
  To: viro; +Cc: jeffm, chris.mason, jack, reiserfs-devel, linux-ext4, linux-fsdevel

It's bad enough that we still have filesystems who can't deal with
the volatile write caches present on all modern consumer disks, but
let's at least make use of this feature where present instead of
playing fast and lose with users data.  Switch ext3 and reiserfs
to the same default already applied in btrfs, ext4, gfs2, hfsplus,
nilfs2 and XFS.

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

* [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 18:25 [PATCH 0/2] always default to issue cache flushes Christoph Hellwig
@ 2011-07-11 18:25 ` Christoph Hellwig
  2011-07-11 19:17   ` Jan Kara
                     ` (2 more replies)
  2011-07-11 18:26 ` [PATCH 2/2] reiserfs: make reiserfs default to barrier=flush Christoph Hellwig
  2011-07-11 19:19 ` [PATCH 0/2] always default to issue cache flushes Jan Kara
  2 siblings, 3 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-07-11 18:25 UTC (permalink / raw)
  To: viro; +Cc: jeffm, chris.mason, jack, reiserfs-devel, linux-ext4, linux-fsdevel

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,

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

* [PATCH 2/2] reiserfs: make reiserfs default to barrier=flush
  2011-07-11 18:25 [PATCH 0/2] always default to issue cache flushes Christoph Hellwig
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
@ 2011-07-11 18:26 ` Christoph Hellwig
  2011-07-11 19:19 ` [PATCH 0/2] always default to issue cache flushes Jan Kara
  2 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-07-11 18:26 UTC (permalink / raw)
  To: viro; +Cc: jeffm, chris.mason, jack, reiserfs-devel, linux-ext4, linux-fsdevel

From: Jeff Mahoney <jeffm@suse.com>

Change the default reiserfs mount option to barrier=flush.

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

Index: linux-2.6/fs/reiserfs/super.c
===================================================================
--- linux-2.6.orig/fs/reiserfs/super.c	2011-07-02 13:57:08.061117424 +0200
+++ linux-2.6/fs/reiserfs/super.c	2011-07-02 13:59:26.197782375 +0200
@@ -1643,6 +1643,7 @@ static int reiserfs_fill_super(struct su
 	/* Set default values for options: non-aggressive tails, RO on errors */
 	REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_SMALLTAIL);
 	REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_ERROR_RO);
+	REISERFS_SB(s)->s_mount_opt |= (1 << REISERFS_BARRIER_FLUSH);
 	/* no preallocation minimum, be smart in
 	   reiserfs_file_write instead */
 	REISERFS_SB(s)->s_alloc_options.preallocmin = 0;

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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
@ 2011-07-11 19:17   ` Jan Kara
  2011-07-11 19:20     ` Christoph Hellwig
  2011-07-11 22:23     ` Ted Ts'o
  2011-07-12  0:16   ` Eric Sandeen
  2011-07-12 13:24   ` Chris Mason
  2 siblings, 2 replies; 10+ messages in thread
From: Jan Kara @ 2011-07-11 19:17 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: viro, jeffm, chris.mason, jack, reiserfs-devel, linux-ext4,
	linux-fsdevel

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,
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

* Re: [PATCH 0/2] always default to issue cache flushes
  2011-07-11 18:25 [PATCH 0/2] always default to issue cache flushes Christoph Hellwig
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
  2011-07-11 18:26 ` [PATCH 2/2] reiserfs: make reiserfs default to barrier=flush Christoph Hellwig
@ 2011-07-11 19:19 ` Jan Kara
  2 siblings, 0 replies; 10+ messages in thread
From: Jan Kara @ 2011-07-11 19:19 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: viro, jeffm, chris.mason, jack, reiserfs-devel, linux-ext4,
	linux-fsdevel

On Mon 11-07-11 14:25:33, Christoph Hellwig wrote:
> It's bad enough that we still have filesystems who can't deal with
> the volatile write caches present on all modern consumer disks, but
> let's at least make use of this feature where present instead of
> playing fast and lose with users data.  Switch ext3 and reiserfs
> to the same default already applied in btrfs, ext4, gfs2, hfsplus,
> nilfs2 and XFS.
  Maybe it's worth noting that both RH and SUSE distributions actually have
barriers switched on by default for years so this change isn't going to
affect most enterprise users.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 19:17   ` Jan Kara
@ 2011-07-11 19:20     ` Christoph Hellwig
  2011-07-11 22:23     ` Ted Ts'o
  1 sibling, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-07-11 19:20 UTC (permalink / raw)
  To: Jan Kara
  Cc: Christoph Hellwig, viro, jeffm, chris.mason, reiserfs-devel,
	linux-ext4, linux-fsdevel

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.


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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 19:17   ` Jan Kara
  2011-07-11 19:20     ` Christoph Hellwig
@ 2011-07-11 22:23     ` Ted Ts'o
  1 sibling, 0 replies; 10+ messages in thread
From: Ted Ts'o @ 2011-07-11 22:23 UTC (permalink / raw)
  To: Jan Kara
  Cc: Christoph Hellwig, viro, jeffm, chris.mason, reiserfs-devel,
	linux-ext4, linux-fsdevel

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

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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
  2011-07-11 19:17   ` Jan Kara
@ 2011-07-12  0:16   ` Eric Sandeen
  2011-07-12 13:24   ` Chris Mason
  2 siblings, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2011-07-12  0:16 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: viro, jeffm, chris.mason, jack, reiserfs-devel, linux-ext4,
	linux-fsdevel

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

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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
  2011-07-11 19:17   ` Jan Kara
  2011-07-12  0:16   ` Eric Sandeen
@ 2011-07-12 13:24   ` Chris Mason
  2011-07-14 15:19     ` Christoph Hellwig
  2 siblings, 1 reply; 10+ messages in thread
From: Chris Mason @ 2011-07-12 13:24 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: viro, jeffm, jack, reiserfs-devel, linux-ext4, linux-fsdevel

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,

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

* Re: [PATCH 1/2] ext3: make ext3 mount default to barrier=1
  2011-07-12 13:24   ` Chris Mason
@ 2011-07-14 15:19     ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2011-07-14 15:19 UTC (permalink / raw)
  To: Chris Mason
  Cc: Christoph Hellwig, viro, jeffm, jack, reiserfs-devel, linux-ext4,
	linux-fsdevel

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.


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

end of thread, other threads:[~2011-07-14 15:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-11 18:25 [PATCH 0/2] always default to issue cache flushes Christoph Hellwig
2011-07-11 18:25 ` [PATCH 1/2] ext3: make ext3 mount default to barrier=1 Christoph Hellwig
2011-07-11 19:17   ` Jan Kara
2011-07-11 19:20     ` Christoph Hellwig
2011-07-11 22:23     ` Ted Ts'o
2011-07-12  0:16   ` Eric Sandeen
2011-07-12 13:24   ` Chris Mason
2011-07-14 15:19     ` Christoph Hellwig
2011-07-11 18:26 ` [PATCH 2/2] reiserfs: make reiserfs default to barrier=flush Christoph Hellwig
2011-07-11 19:19 ` [PATCH 0/2] always default to issue cache flushes Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.