diff options
author | Christoph Hellwig <hch@infradead.org> | 2010-08-18 05:29:13 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-10 06:35:39 -0400 |
commit | f1e4d518c3beddf67f7722f3548eda0ec7006204 (patch) | |
tree | eafc3939ae2941ce8c543383a2e7cf569076e362 /fs/gfs2/log.c | |
parent | c3b9a62c8f932f32a733d6b628f61f3f28345727 (diff) |
gfs2: replace barriers with explicit flush / FUA usage
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@lst.de>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r-- | fs/gfs2/log.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c index cde1248a6225..9c65170e932e 100644 --- a/fs/gfs2/log.c +++ b/fs/gfs2/log.c | |||
@@ -592,22 +592,13 @@ static void log_write_header(struct gfs2_sbd *sdp, u32 flags, int pull) | |||
592 | lh->lh_hash = cpu_to_be32(hash); | 592 | lh->lh_hash = cpu_to_be32(hash); |
593 | 593 | ||
594 | bh->b_end_io = end_buffer_write_sync; | 594 | bh->b_end_io = end_buffer_write_sync; |
595 | if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) | ||
596 | goto skip_barrier; | ||
597 | get_bh(bh); | 595 | get_bh(bh); |
598 | submit_bh(WRITE_BARRIER | REQ_META, bh); | 596 | if (test_bit(SDF_NOBARRIERS, &sdp->sd_flags)) |
599 | wait_on_buffer(bh); | ||
600 | if (buffer_eopnotsupp(bh)) { | ||
601 | clear_buffer_eopnotsupp(bh); | ||
602 | set_buffer_uptodate(bh); | ||
603 | fs_info(sdp, "barrier sync failed - disabling barriers\n"); | ||
604 | set_bit(SDF_NOBARRIERS, &sdp->sd_flags); | ||
605 | lock_buffer(bh); | ||
606 | skip_barrier: | ||
607 | get_bh(bh); | ||
608 | submit_bh(WRITE_SYNC | REQ_META, bh); | 597 | submit_bh(WRITE_SYNC | REQ_META, bh); |
609 | wait_on_buffer(bh); | 598 | else |
610 | } | 599 | submit_bh(WRITE_FLUSH_FUA | REQ_META, bh); |
600 | wait_on_buffer(bh); | ||
601 | |||
611 | if (!buffer_uptodate(bh)) | 602 | if (!buffer_uptodate(bh)) |
612 | gfs2_io_error_bh(sdp, bh); | 603 | gfs2_io_error_bh(sdp, bh); |
613 | brelse(bh); | 604 | brelse(bh); |