aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c18
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h11
-rw-r--r--fs/xfs/linux-2.6/xfs_super.c3
-rw-r--r--fs/xfs/linux-2.6/xfs_trace.h1
-rw-r--r--fs/xfs/xfs_log.c13
5 files changed, 5 insertions, 41 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index 52785189212f..ba5312802aa9 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -986,19 +986,7 @@ xfs_buf_iodone_work(
986 xfs_buf_t *bp = 986 xfs_buf_t *bp =
987 container_of(work, xfs_buf_t, b_iodone_work); 987 container_of(work, xfs_buf_t, b_iodone_work);
988 988
989 /* 989 if (bp->b_iodone)
990 * We can get an EOPNOTSUPP to ordered writes. Here we clear the
991 * ordered flag and reissue them. Because we can't tell the higher
992 * layers directly that they should not issue ordered I/O anymore, they
993 * need to check if the _XFS_BARRIER_FAILED flag was set during I/O completion.
994 */
995 if ((bp->b_error == EOPNOTSUPP) &&
996 (bp->b_flags & (XBF_ORDERED|XBF_ASYNC)) == (XBF_ORDERED|XBF_ASYNC)) {
997 trace_xfs_buf_ordered_retry(bp, _RET_IP_);
998 bp->b_flags &= ~XBF_ORDERED;
999 bp->b_flags |= _XFS_BARRIER_FAILED;
1000 xfs_buf_iorequest(bp);
1001 } else if (bp->b_iodone)
1002 (*(bp->b_iodone))(bp); 990 (*(bp->b_iodone))(bp);
1003 else if (bp->b_flags & XBF_ASYNC) 991 else if (bp->b_flags & XBF_ASYNC)
1004 xfs_buf_relse(bp); 992 xfs_buf_relse(bp);
@@ -1254,7 +1242,7 @@ _xfs_buf_ioapply(
1254 1242
1255 if (bp->b_flags & XBF_ORDERED) { 1243 if (bp->b_flags & XBF_ORDERED) {
1256 ASSERT(!(bp->b_flags & XBF_READ)); 1244 ASSERT(!(bp->b_flags & XBF_READ));
1257 rw = WRITE_BARRIER; 1245 rw = WRITE_FLUSH_FUA;
1258 } else if (bp->b_flags & XBF_LOG_BUFFER) { 1246 } else if (bp->b_flags & XBF_LOG_BUFFER) {
1259 ASSERT(!(bp->b_flags & XBF_READ_AHEAD)); 1247 ASSERT(!(bp->b_flags & XBF_READ_AHEAD));
1260 bp->b_flags &= ~_XBF_RUN_QUEUES; 1248 bp->b_flags &= ~_XBF_RUN_QUEUES;
@@ -1954,7 +1942,7 @@ xfs_buf_init(void)
1954 goto out; 1942 goto out;
1955 1943
1956 xfslogd_workqueue = alloc_workqueue("xfslogd", 1944 xfslogd_workqueue = alloc_workqueue("xfslogd",
1957 WQ_RESCUER | WQ_HIGHPRI, 1); 1945 WQ_MEM_RECLAIM | WQ_HIGHPRI, 1);
1958 if (!xfslogd_workqueue) 1946 if (!xfslogd_workqueue)
1959 goto out_free_buf_zone; 1947 goto out_free_buf_zone;
1960 1948
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index 131c0ebf2c0d..383a3f37cf98 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -85,14 +85,6 @@ typedef enum {
85 */ 85 */
86#define _XBF_PAGE_LOCKED (1 << 22) 86#define _XBF_PAGE_LOCKED (1 << 22)
87 87
88/*
89 * If we try a barrier write, but it fails we have to communicate
90 * this to the upper layers. Unfortunately b_error gets overwritten
91 * when the buffer is re-issued so we have to add another flag to
92 * keep this information.
93 */
94#define _XFS_BARRIER_FAILED (1 << 23)
95
96typedef unsigned int xfs_buf_flags_t; 88typedef unsigned int xfs_buf_flags_t;
97 89
98#define XFS_BUF_FLAGS \ 90#define XFS_BUF_FLAGS \
@@ -112,8 +104,7 @@ typedef unsigned int xfs_buf_flags_t;
112 { _XBF_PAGES, "PAGES" }, \ 104 { _XBF_PAGES, "PAGES" }, \
113 { _XBF_RUN_QUEUES, "RUN_QUEUES" }, \ 105 { _XBF_RUN_QUEUES, "RUN_QUEUES" }, \
114 { _XBF_DELWRI_Q, "DELWRI_Q" }, \ 106 { _XBF_DELWRI_Q, "DELWRI_Q" }, \
115 { _XBF_PAGE_LOCKED, "PAGE_LOCKED" }, \ 107 { _XBF_PAGE_LOCKED, "PAGE_LOCKED" }
116 { _XFS_BARRIER_FAILED, "BARRIER_FAILED" }
117 108
118 109
119typedef enum { 110typedef enum {
diff --git a/fs/xfs/linux-2.6/xfs_super.c b/fs/xfs/linux-2.6/xfs_super.c
index fa1e40ac4b35..ab31ce5aeaf9 100644
--- a/fs/xfs/linux-2.6/xfs_super.c
+++ b/fs/xfs/linux-2.6/xfs_super.c
@@ -692,8 +692,7 @@ void
692xfs_blkdev_issue_flush( 692xfs_blkdev_issue_flush(
693 xfs_buftarg_t *buftarg) 693 xfs_buftarg_t *buftarg)
694{ 694{
695 blkdev_issue_flush(buftarg->bt_bdev, GFP_KERNEL, NULL, 695 blkdev_issue_flush(buftarg->bt_bdev, GFP_KERNEL, NULL);
696 BLKDEV_IFL_WAIT);
697} 696}
698 697
699STATIC void 698STATIC void
diff --git a/fs/xfs/linux-2.6/xfs_trace.h b/fs/xfs/linux-2.6/xfs_trace.h
index 286dc201c5b9..acef2e98c594 100644
--- a/fs/xfs/linux-2.6/xfs_trace.h
+++ b/fs/xfs/linux-2.6/xfs_trace.h
@@ -325,7 +325,6 @@ DEFINE_BUF_EVENT(xfs_buf_lock);
325DEFINE_BUF_EVENT(xfs_buf_lock_done); 325DEFINE_BUF_EVENT(xfs_buf_lock_done);
326DEFINE_BUF_EVENT(xfs_buf_cond_lock); 326DEFINE_BUF_EVENT(xfs_buf_cond_lock);
327DEFINE_BUF_EVENT(xfs_buf_unlock); 327DEFINE_BUF_EVENT(xfs_buf_unlock);
328DEFINE_BUF_EVENT(xfs_buf_ordered_retry);
329DEFINE_BUF_EVENT(xfs_buf_iowait); 328DEFINE_BUF_EVENT(xfs_buf_iowait);
330DEFINE_BUF_EVENT(xfs_buf_iowait_done); 329DEFINE_BUF_EVENT(xfs_buf_iowait_done);
331DEFINE_BUF_EVENT(xfs_buf_delwri_queue); 330DEFINE_BUF_EVENT(xfs_buf_delwri_queue);
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index f4fd49c9b987..cee4ab9f8a9e 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -917,19 +917,6 @@ xlog_iodone(xfs_buf_t *bp)
917 l = iclog->ic_log; 917 l = iclog->ic_log;
918 918
919 /* 919 /*
920 * If the _XFS_BARRIER_FAILED flag was set by a lower
921 * layer, it means the underlying device no longer supports
922 * barrier I/O. Warn loudly and turn off barriers.
923 */
924 if (bp->b_flags & _XFS_BARRIER_FAILED) {
925 bp->b_flags &= ~_XFS_BARRIER_FAILED;
926 l->l_mp->m_flags &= ~XFS_MOUNT_BARRIER;
927 xfs_fs_cmn_err(CE_WARN, l->l_mp,
928 "xlog_iodone: Barriers are no longer supported"
929 " by device. Disabling barriers\n");
930 }
931
932 /*
933 * Race to shutdown the filesystem if we see an error. 920 * Race to shutdown the filesystem if we see an error.
934 */ 921 */
935 if (XFS_TEST_ERROR((XFS_BUF_GETERROR(bp)), l->l_mp, 922 if (XFS_TEST_ERROR((XFS_BUF_GETERROR(bp)), l->l_mp,