Re: [PATCH 05/15] gfs2: replace barriers with explicit flush / FUA usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Acked-by: Steven Whitehouse <swhiteho@xxxxxxxxxx>

Steve.

On Wed, 2010-08-18 at 05:29 -0400, Christoph Hellwig wrote:
> plain text document attachment (gfs2-use-flush-fua)
> Switch to the WRITE_FLUSH_FUA flag for log writes, remove the EOPNOTSUPP
> detection for barriers and stop setting the barrier flag for discards.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Index: linux-2.6/fs/gfs2/log.c
> ===================================================================
> --- linux-2.6.orig/fs/gfs2/log.c	2010-08-17 16:19:53.597003932 +0200
> +++ linux-2.6/fs/gfs2/log.c	2010-08-17 16:22:04.889005329 +0200
> @@ -592,22 +592,13 @@ static void log_write_header(struct gfs2
>  	lh->lh_hash = cpu_to_be32(hash);
>  
>  	bh->b_end_io = end_buffer_write_sync;
> -	if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
> -		goto skip_barrier;
>  	get_bh(bh);
> -	submit_bh(WRITE_BARRIER | REQ_META, bh);
> -	wait_on_buffer(bh);
> -	if (buffer_eopnotsupp(bh)) {
> -		clear_buffer_eopnotsupp(bh);
> -		set_buffer_uptodate(bh);
> -		fs_info(sdp, "barrier sync failed - disabling barriers\n");
> -		set_bit(SDF_NOBARRIERS, &sdp->sd_flags);
> -		lock_buffer(bh);
> -skip_barrier:
> -		get_bh(bh);
> +	if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags))
>  		submit_bh(WRITE_SYNC | REQ_META, bh);
> -		wait_on_buffer(bh);
> -	}
> +	else
> +		submit_bh(WRITE_FLUSH_FUA | REQ_META, bh);
> +	wait_on_buffer(bh);
> +
>  	if (!buffer_uptodate(bh))
>  		gfs2_io_error_bh(sdp, bh);
>  	brelse(bh);
> Index: linux-2.6/fs/gfs2/rgrp.c
> ===================================================================
> --- linux-2.6.orig/fs/gfs2/rgrp.c	2010-08-17 16:21:23.626253967 +0200
> +++ linux-2.6/fs/gfs2/rgrp.c	2010-08-17 16:21:39.702005748 +0200
> @@ -854,8 +854,7 @@ static void gfs2_rgrp_send_discards(stru
>  				if ((start + nr_sects) != blk) {
>  					rv = blkdev_issue_discard(bdev, start,
>  							    nr_sects, GFP_NOFS,
> -							    BLKDEV_IFL_WAIT |
> -							    BLKDEV_IFL_BARRIER);
> +							    BLKDEV_IFL_WAIT);
>  					if (rv)
>  						goto fail;
>  					nr_sects = 0;
> @@ -870,7 +869,7 @@ start_new_extent:
>  	}
>  	if (nr_sects) {
>  		rv = blkdev_issue_discard(bdev, start, nr_sects, GFP_NOFS,
> -					 BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
> +					 BLKDEV_IFL_WAIT);
>  		if (rv)
>  			goto fail;
>  	}
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux