aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_buf.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-08-18 05:29:11 -0400
committerJens Axboe <jaxboe@fusionio.com>2010-09-10 06:35:38 -0400
commit80f6c29d8a758650d5c9eac05074b4b3e8c266df (patch)
treea08a3c49536e382a8f3e473c98d08613a0ac82fa /fs/xfs/linux-2.6/xfs_buf.c
parent2cf6d26a354ab6362e301b5a323832b02867df47 (diff)
xfs: replace barriers with explicit flush / FUA usage
Switch to the WRITE_FLUSH_FUA flag for log writes and remove the EOPNOTSUPP detection for barriers. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_buf.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index ea79072f5210..b93ea3342281 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -929,19 +929,7 @@ xfs_buf_iodone_work(
929 xfs_buf_t *bp = 929 xfs_buf_t *bp =
930 container_of(work, xfs_buf_t, b_iodone_work); 930 container_of(work, xfs_buf_t, b_iodone_work);
931 931
932 /* 932 if (bp->b_iodone)
933 * We can get an EOPNOTSUPP to ordered writes. Here we clear the
934 * ordered flag and reissue them. Because we can't tell the higher
935 * layers directly that they should not issue ordered I/O anymore, they
936 * need to check if the _XFS_BARRIER_FAILED flag was set during I/O completion.
937 */
938 if ((bp->b_error == EOPNOTSUPP) &&
939 (bp->b_flags & (XBF_ORDERED|XBF_ASYNC)) == (XBF_ORDERED|XBF_ASYNC)) {
940 trace_xfs_buf_ordered_retry(bp, _RET_IP_);
941 bp->b_flags &= ~XBF_ORDERED;
942 bp->b_flags |= _XFS_BARRIER_FAILED;
943 xfs_buf_iorequest(bp);
944 } else if (bp->b_iodone)
945 (*(bp->b_iodone))(bp); 933 (*(bp->b_iodone))(bp);
946 else if (bp->b_flags & XBF_ASYNC) 934 else if (bp->b_flags & XBF_ASYNC)
947 xfs_buf_relse(bp); 935 xfs_buf_relse(bp);
@@ -1200,7 +1188,7 @@ _xfs_buf_ioapply(
1200 1188
1201 if (bp->b_flags & XBF_ORDERED) { 1189 if (bp->b_flags & XBF_ORDERED) {
1202 ASSERT(!(bp->b_flags & XBF_READ)); 1190 ASSERT(!(bp->b_flags & XBF_READ));
1203 rw = WRITE_BARRIER; 1191 rw = WRITE_FLUSH_FUA;
1204 } else if (bp->b_flags & XBF_LOG_BUFFER) { 1192 } else if (bp->b_flags & XBF_LOG_BUFFER) {
1205 ASSERT(!(bp->b_flags & XBF_READ_AHEAD)); 1193 ASSERT(!(bp->b_flags & XBF_READ_AHEAD));
1206 bp->b_flags &= ~_XBF_RUN_QUEUES; 1194 bp->b_flags &= ~_XBF_RUN_QUEUES;