aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-10-10 12:52:46 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:10 -0400
commitc867cb61641751fd3d86350232d64ae2a10137d4 (patch)
tree414d38d5edd941cee2eb07f9eeb7ebaa29d1cd5b /fs
parent38f23232449c9d2c0bc8e9541cb8ab08b7c2b9ce (diff)
xfs: remove XFS_BUF_STALE and XFS_BUF_SUPER_STALE
Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_attr.c2
-rw-r--r--fs/xfs/xfs_buf.c4
-rw-r--r--fs/xfs/xfs_buf.h6
-rw-r--r--fs/xfs/xfs_buf_item.c6
-rw-r--r--fs/xfs/xfs_inode.c4
-rw-r--r--fs/xfs/xfs_log.c4
-rw-r--r--fs/xfs/xfs_log_recover.c2
-rw-r--r--fs/xfs/xfs_rw.c2
-rw-r--r--fs/xfs/xfs_trans_buf.c13
9 files changed, 22 insertions, 21 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 981a0624f382..ae8f917490d4 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -2168,7 +2168,7 @@ xfs_attr_rmtval_remove(xfs_da_args_t *args)
2168 */ 2168 */
2169 bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, XBF_TRYLOCK); 2169 bp = xfs_incore(mp->m_ddev_targp, dblkno, blkcnt, XBF_TRYLOCK);
2170 if (bp) { 2170 if (bp) {
2171 XFS_BUF_STALE(bp); 2171 xfs_buf_stale(bp);
2172 xfs_buf_delwri_dequeue(bp); 2172 xfs_buf_delwri_dequeue(bp);
2173 xfs_buf_relse(bp); 2173 xfs_buf_relse(bp);
2174 bp = NULL; 2174 bp = NULL;
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 36fed03da26f..f88eab9e8144 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1061,7 +1061,7 @@ xfs_bioerror(
1061 XFS_BUF_UNREAD(bp); 1061 XFS_BUF_UNREAD(bp);
1062 xfs_buf_delwri_dequeue(bp); 1062 xfs_buf_delwri_dequeue(bp);
1063 XFS_BUF_UNDONE(bp); 1063 XFS_BUF_UNDONE(bp);
1064 XFS_BUF_STALE(bp); 1064 xfs_buf_stale(bp);
1065 1065
1066 xfs_buf_ioend(bp, 0); 1066 xfs_buf_ioend(bp, 0);
1067 1067
@@ -1090,7 +1090,7 @@ xfs_bioerror_relse(
1090 XFS_BUF_UNREAD(bp); 1090 XFS_BUF_UNREAD(bp);
1091 xfs_buf_delwri_dequeue(bp); 1091 xfs_buf_delwri_dequeue(bp);
1092 XFS_BUF_DONE(bp); 1092 XFS_BUF_DONE(bp);
1093 XFS_BUF_STALE(bp); 1093 xfs_buf_stale(bp);
1094 bp->b_iodone = NULL; 1094 bp->b_iodone = NULL;
1095 if (!(fl & XBF_ASYNC)) { 1095 if (!(fl & XBF_ASYNC)) {
1096 /* 1096 /*
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index ca2934717343..fa38401449d9 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -242,14 +242,8 @@ xfs_buf_target_name(struct xfs_buftarg *target)
242 XBF_SYNCIO|XBF_FUA|XBF_FLUSH)) 242 XBF_SYNCIO|XBF_FUA|XBF_FLUSH))
243 243
244void xfs_buf_stale(struct xfs_buf *bp); 244void xfs_buf_stale(struct xfs_buf *bp);
245#define XFS_BUF_STALE(bp) xfs_buf_stale(bp);
246#define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XBF_STALE) 245#define XFS_BUF_UNSTALE(bp) ((bp)->b_flags &= ~XBF_STALE)
247#define XFS_BUF_ISSTALE(bp) ((bp)->b_flags & XBF_STALE) 246#define XFS_BUF_ISSTALE(bp) ((bp)->b_flags & XBF_STALE)
248#define XFS_BUF_SUPER_STALE(bp) do { \
249 XFS_BUF_STALE(bp); \
250 xfs_buf_delwri_dequeue(bp); \
251 XFS_BUF_DONE(bp); \
252 } while (0)
253 247
254#define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI) 248#define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI)
255 249
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c
index 3243083d8693..8213f4a753dc 100644
--- a/fs/xfs/xfs_buf_item.c
+++ b/fs/xfs/xfs_buf_item.c
@@ -966,7 +966,9 @@ xfs_buf_iodone_callbacks(
966 * I/O errors, there's no point in giving this a retry. 966 * I/O errors, there's no point in giving this a retry.
967 */ 967 */
968 if (XFS_FORCED_SHUTDOWN(mp)) { 968 if (XFS_FORCED_SHUTDOWN(mp)) {
969 XFS_BUF_SUPER_STALE(bp); 969 xfs_buf_stale(bp);
970 xfs_buf_delwri_dequeue(bp);
971 XFS_BUF_DONE(bp);
970 trace_xfs_buf_item_iodone(bp, _RET_IP_); 972 trace_xfs_buf_item_iodone(bp, _RET_IP_);
971 goto do_callbacks; 973 goto do_callbacks;
972 } 974 }
@@ -1005,7 +1007,7 @@ xfs_buf_iodone_callbacks(
1005 * If the write of the buffer was synchronous, we want to make 1007 * If the write of the buffer was synchronous, we want to make
1006 * sure to return the error to the caller of xfs_bwrite(). 1008 * sure to return the error to the caller of xfs_bwrite().
1007 */ 1009 */
1008 XFS_BUF_STALE(bp); 1010 xfs_buf_stale(bp);
1009 XFS_BUF_DONE(bp); 1011 XFS_BUF_DONE(bp);
1010 xfs_buf_delwri_dequeue(bp); 1012 xfs_buf_delwri_dequeue(bp);
1011 1013
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 21cec6cdf453..c0237c602f11 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2469,11 +2469,11 @@ cluster_corrupt_out:
2469 */ 2469 */
2470 if (bp->b_iodone) { 2470 if (bp->b_iodone) {
2471 XFS_BUF_UNDONE(bp); 2471 XFS_BUF_UNDONE(bp);
2472 XFS_BUF_STALE(bp); 2472 xfs_buf_stale(bp);
2473 xfs_buf_ioerror(bp, EIO); 2473 xfs_buf_ioerror(bp, EIO);
2474 xfs_buf_ioend(bp, 0); 2474 xfs_buf_ioend(bp, 0);
2475 } else { 2475 } else {
2476 XFS_BUF_STALE(bp); 2476 xfs_buf_stale(bp);
2477 xfs_buf_relse(bp); 2477 xfs_buf_relse(bp);
2478 } 2478 }
2479 } 2479 }
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 3a8d4f66d702..493447dc4f55 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -881,7 +881,7 @@ xlog_iodone(xfs_buf_t *bp)
881 if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp, 881 if (XFS_TEST_ERROR((xfs_buf_geterror(bp)), l->l_mp,
882 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) { 882 XFS_ERRTAG_IODONE_IOERR, XFS_RANDOM_IODONE_IOERR)) {
883 xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp)); 883 xfs_ioerror_alert("xlog_iodone", l->l_mp, bp, XFS_BUF_ADDR(bp));
884 XFS_BUF_STALE(bp); 884 xfs_buf_stale(bp);
885 xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR); 885 xfs_force_shutdown(l->l_mp, SHUTDOWN_LOG_IO_ERROR);
886 /* 886 /*
887 * This flag will be propagated to the trans-committed 887 * This flag will be propagated to the trans-committed
@@ -1247,7 +1247,7 @@ xlog_bdstrat(
1247 1247
1248 if (iclog->ic_state & XLOG_STATE_IOERROR) { 1248 if (iclog->ic_state & XLOG_STATE_IOERROR) {
1249 xfs_buf_ioerror(bp, EIO); 1249 xfs_buf_ioerror(bp, EIO);
1250 XFS_BUF_STALE(bp); 1250 xfs_buf_stale(bp);
1251 xfs_buf_ioend(bp, 0); 1251 xfs_buf_ioend(bp, 0);
1252 /* 1252 /*
1253 * It would seem logical to return EIO here, but we rely on 1253 * It would seem logical to return EIO here, but we rely on
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index be173852b2ca..8f70f3469997 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2174,7 +2174,7 @@ xlog_recover_buffer_pass2(
2174 be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) && 2174 be16_to_cpu(*((__be16 *)xfs_buf_offset(bp, 0))) &&
2175 (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize, 2175 (XFS_BUF_COUNT(bp) != MAX(log->l_mp->m_sb.sb_blocksize,
2176 (__uint32_t)XFS_INODE_CLUSTER_SIZE(log->l_mp)))) { 2176 (__uint32_t)XFS_INODE_CLUSTER_SIZE(log->l_mp)))) {
2177 XFS_BUF_STALE(bp); 2177 xfs_buf_stale(bp);
2178 error = xfs_bwrite(bp); 2178 error = xfs_bwrite(bp);
2179 } else { 2179 } else {
2180 ASSERT(bp->b_target->bt_mount == mp); 2180 ASSERT(bp->b_target->bt_mount == mp);
diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c
index 99823c3b9aca..ff33645fe62d 100644
--- a/fs/xfs/xfs_rw.c
+++ b/fs/xfs/xfs_rw.c
@@ -150,7 +150,7 @@ xfs_read_buf(
150 if (bp) { 150 if (bp) {
151 XFS_BUF_UNDONE(bp); 151 XFS_BUF_UNDONE(bp);
152 xfs_buf_delwri_dequeue(bp); 152 xfs_buf_delwri_dequeue(bp);
153 XFS_BUF_STALE(bp); 153 xfs_buf_stale(bp);
154 /* 154 /*
155 * brelse clears B_ERROR and b_error 155 * brelse clears B_ERROR and b_error
156 */ 156 */
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c
index 5e5196a269dd..d03a8ee19172 100644
--- a/fs/xfs/xfs_trans_buf.c
+++ b/fs/xfs/xfs_trans_buf.c
@@ -160,8 +160,11 @@ xfs_trans_get_buf(xfs_trans_t *tp,
160 bp = xfs_trans_buf_item_match(tp, target_dev, blkno, len); 160 bp = xfs_trans_buf_item_match(tp, target_dev, blkno, len);
161 if (bp != NULL) { 161 if (bp != NULL) {
162 ASSERT(xfs_buf_islocked(bp)); 162 ASSERT(xfs_buf_islocked(bp));
163 if (XFS_FORCED_SHUTDOWN(tp->t_mountp)) 163 if (XFS_FORCED_SHUTDOWN(tp->t_mountp)) {
164 XFS_BUF_SUPER_STALE(bp); 164 xfs_buf_stale(bp);
165 xfs_buf_delwri_dequeue(bp);
166 XFS_BUF_DONE(bp);
167 }
165 168
166 /* 169 /*
167 * If the buffer is stale then it was binval'ed 170 * If the buffer is stale then it was binval'ed
@@ -387,7 +390,9 @@ xfs_trans_read_buf(
387 } 390 }
388 if (bp->b_error) { 391 if (bp->b_error) {
389 error = bp->b_error; 392 error = bp->b_error;
390 XFS_BUF_SUPER_STALE(bp); 393 xfs_buf_stale(bp);
394 xfs_buf_delwri_dequeue(bp);
395 XFS_BUF_DONE(bp);
391 xfs_ioerror_alert("xfs_trans_read_buf", mp, 396 xfs_ioerror_alert("xfs_trans_read_buf", mp,
392 bp, blkno); 397 bp, blkno);
393 if (tp->t_flags & XFS_TRANS_DIRTY) 398 if (tp->t_flags & XFS_TRANS_DIRTY)
@@ -740,7 +745,7 @@ xfs_trans_binval(
740 * rid of it. 745 * rid of it.
741 */ 746 */
742 xfs_buf_delwri_dequeue(bp); 747 xfs_buf_delwri_dequeue(bp);
743 XFS_BUF_STALE(bp); 748 xfs_buf_stale(bp);
744 bip->bli_flags |= XFS_BLI_STALE; 749 bip->bli_flags |= XFS_BLI_STALE;
745 bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); 750 bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY);
746 bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; 751 bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF;