diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.c | 6 | ||||
-rw-r--r-- | fs/xfs/linux-2.6/xfs_buf.h | 4 | ||||
-rw-r--r-- | fs/xfs/quota/xfs_dquot.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_alloc.c | 7 | ||||
-rw-r--r-- | fs/xfs/xfs_attr.c | 3 | ||||
-rw-r--r-- | fs/xfs/xfs_btree.c | 17 | ||||
-rw-r--r-- | fs/xfs/xfs_buf_item.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_da_btree.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_ialloc.c | 5 | ||||
-rw-r--r-- | fs/xfs/xfs_inode.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_log.c | 4 | ||||
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 12 | ||||
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 2 | ||||
-rw-r--r-- | fs/xfs/xfs_rw.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 15 | ||||
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 4 |
16 files changed, 40 insertions, 55 deletions
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c index 969fd151024c..704418a04991 100644 --- a/fs/xfs/linux-2.6/xfs_buf.c +++ b/fs/xfs/linux-2.6/xfs_buf.c | |||
@@ -596,7 +596,7 @@ _xfs_buf_read( | |||
596 | bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | XBF_READ_AHEAD); | 596 | bp->b_flags |= flags & (XBF_READ | XBF_ASYNC | XBF_READ_AHEAD); |
597 | 597 | ||
598 | status = xfs_buf_iorequest(bp); | 598 | status = xfs_buf_iorequest(bp); |
599 | if (status || XFS_BUF_ISERROR(bp) || (flags & XBF_ASYNC)) | 599 | if (status || bp->b_error || (flags & XBF_ASYNC)) |
600 | return status; | 600 | return status; |
601 | return xfs_buf_iowait(bp); | 601 | return xfs_buf_iowait(bp); |
602 | } | 602 | } |
@@ -1069,7 +1069,7 @@ xfs_bioerror( | |||
1069 | /* | 1069 | /* |
1070 | * No need to wait until the buffer is unpinned, we aren't flushing it. | 1070 | * No need to wait until the buffer is unpinned, we aren't flushing it. |
1071 | */ | 1071 | */ |
1072 | XFS_BUF_ERROR(bp, EIO); | 1072 | xfs_buf_ioerror(bp, EIO); |
1073 | 1073 | ||
1074 | /* | 1074 | /* |
1075 | * We're calling xfs_buf_ioend, so delete XBF_DONE flag. | 1075 | * We're calling xfs_buf_ioend, so delete XBF_DONE flag. |
@@ -1115,7 +1115,7 @@ xfs_bioerror_relse( | |||
1115 | * There's no reason to mark error for | 1115 | * There's no reason to mark error for |
1116 | * ASYNC buffers. | 1116 | * ASYNC buffers. |
1117 | */ | 1117 | */ |
1118 | XFS_BUF_ERROR(bp, EIO); | 1118 | xfs_buf_ioerror(bp, EIO); |
1119 | XFS_BUF_FINISH_IOWAIT(bp); | 1119 | XFS_BUF_FINISH_IOWAIT(bp); |
1120 | } else { | 1120 | } else { |
1121 | xfs_buf_relse(bp); | 1121 | xfs_buf_relse(bp); |
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h index 6b6c25ff4ead..08a15c25484b 100644 --- a/fs/xfs/linux-2.6/xfs_buf.h +++ b/fs/xfs/linux-2.6/xfs_buf.h | |||
@@ -250,10 +250,6 @@ void xfs_buf_stale(struct xfs_buf *bp); | |||
250 | #define XFS_BUF_UNDELAYWRITE(bp) xfs_buf_delwri_dequeue(bp) | 250 | #define XFS_BUF_UNDELAYWRITE(bp) xfs_buf_delwri_dequeue(bp) |
251 | #define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI) | 251 | #define XFS_BUF_ISDELAYWRITE(bp) ((bp)->b_flags & XBF_DELWRI) |
252 | 252 | ||
253 | #define XFS_BUF_ERROR(bp,no) xfs_buf_ioerror(bp,no) | ||
254 | #define XFS_BUF_GETERROR(bp) xfs_buf_geterror(bp) | ||
255 | #define XFS_BUF_ISERROR(bp) (xfs_buf_geterror(bp) ? 1 : 0) | ||
256 | |||
257 | #define XFS_BUF_DONE(bp) ((bp)->b_flags |= XBF_DONE) | 253 | #define XFS_BUF_DONE(bp) ((bp)->b_flags |= XBF_DONE) |
258 | #define XFS_BUF_UNDONE(bp) ((bp)->b_flags &= ~XBF_DONE) | 254 | #define XFS_BUF_UNDONE(bp) ((bp)->b_flags &= ~XBF_DONE) |
259 | #define XFS_BUF_ISDONE(bp) ((bp)->b_flags & XBF_DONE) | 255 | #define XFS_BUF_ISDONE(bp) ((bp)->b_flags & XBF_DONE) |
diff --git a/fs/xfs/quota/xfs_dquot.c b/fs/xfs/quota/xfs_dquot.c index 837f31158d43..784019d4a576 100644 --- a/fs/xfs/quota/xfs_dquot.c +++ b/fs/xfs/quota/xfs_dquot.c | |||
@@ -403,7 +403,7 @@ xfs_qm_dqalloc( | |||
403 | dqp->q_blkno, | 403 | dqp->q_blkno, |
404 | mp->m_quotainfo->qi_dqchunklen, | 404 | mp->m_quotainfo->qi_dqchunklen, |
405 | 0); | 405 | 0); |
406 | if (!bp || (error = XFS_BUF_GETERROR(bp))) | 406 | if (!bp || (error = xfs_buf_geterror(bp))) |
407 | goto error1; | 407 | goto error1; |
408 | /* | 408 | /* |
409 | * Make a chunk of dquots out of this buffer and log | 409 | * Make a chunk of dquots out of this buffer and log |
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c index 1e00b3ef6274..bdd9cb54d63b 100644 --- a/fs/xfs/xfs_alloc.c +++ b/fs/xfs/xfs_alloc.c | |||
@@ -451,8 +451,7 @@ xfs_alloc_read_agfl( | |||
451 | XFS_FSS_TO_BB(mp, 1), 0, &bp); | 451 | XFS_FSS_TO_BB(mp, 1), 0, &bp); |
452 | if (error) | 452 | if (error) |
453 | return error; | 453 | return error; |
454 | ASSERT(bp); | 454 | ASSERT(!xfs_buf_geterror(bp)); |
455 | ASSERT(!XFS_BUF_GETERROR(bp)); | ||
456 | XFS_BUF_SET_VTYPE_REF(bp, B_FS_AGFL, XFS_AGFL_REF); | 455 | XFS_BUF_SET_VTYPE_REF(bp, B_FS_AGFL, XFS_AGFL_REF); |
457 | *bpp = bp; | 456 | *bpp = bp; |
458 | return 0; | 457 | return 0; |
@@ -2116,7 +2115,7 @@ xfs_read_agf( | |||
2116 | if (!*bpp) | 2115 | if (!*bpp) |
2117 | return 0; | 2116 | return 0; |
2118 | 2117 | ||
2119 | ASSERT(!XFS_BUF_GETERROR(*bpp)); | 2118 | ASSERT(!(*bpp)->b_error); |
2120 | agf = XFS_BUF_TO_AGF(*bpp); | 2119 | agf = XFS_BUF_TO_AGF(*bpp); |
2121 | 2120 | ||
2122 | /* | 2121 | /* |
@@ -2168,7 +2167,7 @@ xfs_alloc_read_agf( | |||
2168 | return error; | 2167 | return error; |
2169 | if (!*bpp) | 2168 | if (!*bpp) |
2170 | return 0; | 2169 | return 0; |
2171 | ASSERT(!XFS_BUF_GETERROR(*bpp)); | 2170 | ASSERT(!(*bpp)->b_error); |
2172 | 2171 | ||
2173 | agf = XFS_BUF_TO_AGF(*bpp); | 2172 | agf = XFS_BUF_TO_AGF(*bpp); |
2174 | pag = xfs_perag_get(mp, agno); | 2173 | pag = xfs_perag_get(mp, agno); |
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index cbae424fe1ba..160bcdc34a6e 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c | |||
@@ -2121,8 +2121,7 @@ xfs_attr_rmtval_set(xfs_da_args_t *args) | |||
2121 | 2121 | ||
2122 | bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, | 2122 | bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, |
2123 | XBF_LOCK | XBF_DONT_BLOCK); | 2123 | XBF_LOCK | XBF_DONT_BLOCK); |
2124 | ASSERT(bp); | 2124 | ASSERT(!xfs_buf_geterror(bp)); |
2125 | ASSERT(!XFS_BUF_GETERROR(bp)); | ||
2126 | 2125 | ||
2127 | tmp = (valuelen < XFS_BUF_SIZE(bp)) ? valuelen : | 2126 | tmp = (valuelen < XFS_BUF_SIZE(bp)) ? valuelen : |
2128 | XFS_BUF_SIZE(bp); | 2127 | XFS_BUF_SIZE(bp); |
diff --git a/fs/xfs/xfs_btree.c b/fs/xfs/xfs_btree.c index cabf4b5604aa..2b9fd385e27d 100644 --- a/fs/xfs/xfs_btree.c +++ b/fs/xfs/xfs_btree.c | |||
@@ -275,8 +275,7 @@ xfs_btree_dup_cursor( | |||
275 | return error; | 275 | return error; |
276 | } | 276 | } |
277 | new->bc_bufs[i] = bp; | 277 | new->bc_bufs[i] = bp; |
278 | ASSERT(bp); | 278 | ASSERT(!xfs_buf_geterror(bp)); |
279 | ASSERT(!XFS_BUF_GETERROR(bp)); | ||
280 | } else | 279 | } else |
281 | new->bc_bufs[i] = NULL; | 280 | new->bc_bufs[i] = NULL; |
282 | } | 281 | } |
@@ -467,8 +466,7 @@ xfs_btree_get_bufl( | |||
467 | ASSERT(fsbno != NULLFSBLOCK); | 466 | ASSERT(fsbno != NULLFSBLOCK); |
468 | d = XFS_FSB_TO_DADDR(mp, fsbno); | 467 | d = XFS_FSB_TO_DADDR(mp, fsbno); |
469 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); | 468 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); |
470 | ASSERT(bp); | 469 | ASSERT(!xfs_buf_geterror(bp)); |
471 | ASSERT(!XFS_BUF_GETERROR(bp)); | ||
472 | return bp; | 470 | return bp; |
473 | } | 471 | } |
474 | 472 | ||
@@ -491,8 +489,7 @@ xfs_btree_get_bufs( | |||
491 | ASSERT(agbno != NULLAGBLOCK); | 489 | ASSERT(agbno != NULLAGBLOCK); |
492 | d = XFS_AGB_TO_DADDR(mp, agno, agbno); | 490 | d = XFS_AGB_TO_DADDR(mp, agno, agbno); |
493 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); | 491 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, mp->m_bsize, lock); |
494 | ASSERT(bp); | 492 | ASSERT(!xfs_buf_geterror(bp)); |
495 | ASSERT(!XFS_BUF_GETERROR(bp)); | ||
496 | return bp; | 493 | return bp; |
497 | } | 494 | } |
498 | 495 | ||
@@ -632,7 +629,7 @@ xfs_btree_read_bufl( | |||
632 | mp->m_bsize, lock, &bp))) { | 629 | mp->m_bsize, lock, &bp))) { |
633 | return error; | 630 | return error; |
634 | } | 631 | } |
635 | ASSERT(!bp || !XFS_BUF_GETERROR(bp)); | 632 | ASSERT(!xfs_buf_geterror(bp)); |
636 | if (bp) | 633 | if (bp) |
637 | XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, refval); | 634 | XFS_BUF_SET_VTYPE_REF(bp, B_FS_MAP, refval); |
638 | *bpp = bp; | 635 | *bpp = bp; |
@@ -973,8 +970,7 @@ xfs_btree_get_buf_block( | |||
973 | *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, | 970 | *bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d, |
974 | mp->m_bsize, flags); | 971 | mp->m_bsize, flags); |
975 | 972 | ||
976 | ASSERT(*bpp); | 973 | ASSERT(!xfs_buf_geterror(*bpp)); |
977 | ASSERT(!XFS_BUF_GETERROR(*bpp)); | ||
978 | 974 | ||
979 | *block = XFS_BUF_TO_BLOCK(*bpp); | 975 | *block = XFS_BUF_TO_BLOCK(*bpp); |
980 | return 0; | 976 | return 0; |
@@ -1006,8 +1002,7 @@ xfs_btree_read_buf_block( | |||
1006 | if (error) | 1002 | if (error) |
1007 | return error; | 1003 | return error; |
1008 | 1004 | ||
1009 | ASSERT(*bpp != NULL); | 1005 | ASSERT(!xfs_buf_geterror(*bpp)); |
1010 | ASSERT(!XFS_BUF_GETERROR(*bpp)); | ||
1011 | 1006 | ||
1012 | xfs_btree_set_refs(cur, *bpp); | 1007 | xfs_btree_set_refs(cur, *bpp); |
1013 | *block = XFS_BUF_TO_BLOCK(*bpp); | 1008 | *block = XFS_BUF_TO_BLOCK(*bpp); |
diff --git a/fs/xfs/xfs_buf_item.c b/fs/xfs/xfs_buf_item.c index 88492916c3dc..38417ab46fde 100644 --- a/fs/xfs/xfs_buf_item.c +++ b/fs/xfs/xfs_buf_item.c | |||
@@ -960,7 +960,7 @@ xfs_buf_iodone_callbacks( | |||
960 | static ulong lasttime; | 960 | static ulong lasttime; |
961 | static xfs_buftarg_t *lasttarg; | 961 | static xfs_buftarg_t *lasttarg; |
962 | 962 | ||
963 | if (likely(!XFS_BUF_GETERROR(bp))) | 963 | if (likely(!xfs_buf_geterror(bp))) |
964 | goto do_callbacks; | 964 | goto do_callbacks; |
965 | 965 | ||
966 | /* | 966 | /* |
@@ -991,7 +991,7 @@ xfs_buf_iodone_callbacks( | |||
991 | * around. | 991 | * around. |
992 | */ | 992 | */ |
993 | if (XFS_BUF_ISASYNC(bp)) { | 993 | if (XFS_BUF_ISASYNC(bp)) { |
994 | XFS_BUF_ERROR(bp, 0); /* errno of 0 unsets the flag */ | 994 | xfs_buf_ioerror(bp, 0); /* errno of 0 unsets the flag */ |
995 | 995 | ||
996 | if (!XFS_BUF_ISSTALE(bp)) { | 996 | if (!XFS_BUF_ISSTALE(bp)) { |
997 | XFS_BUF_DELAYWRITE(bp); | 997 | XFS_BUF_DELAYWRITE(bp); |
diff --git a/fs/xfs/xfs_da_btree.c b/fs/xfs/xfs_da_btree.c index 2925726529f8..5d9290db3d6c 100644 --- a/fs/xfs/xfs_da_btree.c +++ b/fs/xfs/xfs_da_btree.c | |||
@@ -2040,7 +2040,7 @@ xfs_da_do_buf( | |||
2040 | case 0: | 2040 | case 0: |
2041 | bp = xfs_trans_get_buf(trans, mp->m_ddev_targp, | 2041 | bp = xfs_trans_get_buf(trans, mp->m_ddev_targp, |
2042 | mappedbno, nmapped, 0); | 2042 | mappedbno, nmapped, 0); |
2043 | error = bp ? XFS_BUF_GETERROR(bp) : XFS_ERROR(EIO); | 2043 | error = bp ? bp->b_error : XFS_ERROR(EIO); |
2044 | break; | 2044 | break; |
2045 | case 1: | 2045 | case 1: |
2046 | case 2: | 2046 | case 2: |
diff --git a/fs/xfs/xfs_ialloc.c b/fs/xfs/xfs_ialloc.c index dd5628bd8d0b..9f24ec28283b 100644 --- a/fs/xfs/xfs_ialloc.c +++ b/fs/xfs/xfs_ialloc.c | |||
@@ -202,8 +202,7 @@ xfs_ialloc_inode_init( | |||
202 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, | 202 | fbuf = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, |
203 | mp->m_bsize * blks_per_cluster, | 203 | mp->m_bsize * blks_per_cluster, |
204 | XBF_LOCK); | 204 | XBF_LOCK); |
205 | ASSERT(fbuf); | 205 | ASSERT(!xfs_buf_geterror(fbuf)); |
206 | ASSERT(!XFS_BUF_GETERROR(fbuf)); | ||
207 | 206 | ||
208 | /* | 207 | /* |
209 | * Initialize all inodes in this buffer and then log them. | 208 | * Initialize all inodes in this buffer and then log them. |
@@ -1486,7 +1485,7 @@ xfs_read_agi( | |||
1486 | if (error) | 1485 | if (error) |
1487 | return error; | 1486 | return error; |
1488 | 1487 | ||
1489 | ASSERT(*bpp && !XFS_BUF_GETERROR(*bpp)); | 1488 | ASSERT(!xfs_buf_geterror(*bpp)); |
1490 | agi = XFS_BUF_TO_AGI(*bpp); | 1489 | agi = XFS_BUF_TO_AGI(*bpp); |
1491 | 1490 | ||
1492 | /* | 1491 | /* |
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index 3cc21ddf9f7e..bdb47b22c6bc 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -2473,7 +2473,7 @@ cluster_corrupt_out: | |||
2473 | if (bp->b_iodone) { | 2473 | if (bp->b_iodone) { |
2474 | XFS_BUF_UNDONE(bp); | 2474 | XFS_BUF_UNDONE(bp); |
2475 | XFS_BUF_STALE(bp); | 2475 | XFS_BUF_STALE(bp); |
2476 | XFS_BUF_ERROR(bp,EIO); | 2476 | xfs_buf_ioerror(bp, EIO); |
2477 | xfs_buf_ioend(bp, 0); | 2477 | xfs_buf_ioend(bp, 0); |
2478 | } else { | 2478 | } else { |
2479 | XFS_BUF_STALE(bp); | 2479 | XFS_BUF_STALE(bp); |
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 06ff8437ed8e..d1595e7ffd0c 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -878,7 +878,7 @@ xlog_iodone(xfs_buf_t *bp) | |||
878 | /* | 878 | /* |
879 | * Race to shutdown the filesystem if we see an error. | 879 | * Race to shutdown the filesystem if we see an error. |
880 | */ | 880 | */ |
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); |
@@ -1248,7 +1248,7 @@ xlog_bdstrat( | |||
1248 | struct xlog_in_core *iclog = bp->b_fspriv; | 1248 | struct xlog_in_core *iclog = bp->b_fspriv; |
1249 | 1249 | ||
1250 | if (iclog->ic_state & XLOG_STATE_IOERROR) { | 1250 | if (iclog->ic_state & XLOG_STATE_IOERROR) { |
1251 | XFS_BUF_ERROR(bp, EIO); | 1251 | xfs_buf_ioerror(bp, EIO); |
1252 | XFS_BUF_STALE(bp); | 1252 | XFS_BUF_STALE(bp); |
1253 | xfs_buf_ioend(bp, 0); | 1253 | xfs_buf_ioend(bp, 0); |
1254 | /* | 1254 | /* |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 8fe4206de057..a8e0827dbe74 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -360,7 +360,7 @@ STATIC void | |||
360 | xlog_recover_iodone( | 360 | xlog_recover_iodone( |
361 | struct xfs_buf *bp) | 361 | struct xfs_buf *bp) |
362 | { | 362 | { |
363 | if (XFS_BUF_GETERROR(bp)) { | 363 | if (bp->b_error) { |
364 | /* | 364 | /* |
365 | * We're not going to bother about retrying | 365 | * We're not going to bother about retrying |
366 | * this during recovery. One strike! | 366 | * this during recovery. One strike! |
@@ -2135,15 +2135,14 @@ xlog_recover_buffer_pass2( | |||
2135 | 2135 | ||
2136 | bp = xfs_buf_read(mp->m_ddev_targp, buf_f->blf_blkno, buf_f->blf_len, | 2136 | bp = xfs_buf_read(mp->m_ddev_targp, buf_f->blf_blkno, buf_f->blf_len, |
2137 | buf_flags); | 2137 | buf_flags); |
2138 | if (XFS_BUF_ISERROR(bp)) { | 2138 | error = xfs_buf_geterror(bp); |
2139 | if (error) { | ||
2139 | xfs_ioerror_alert("xlog_recover_do..(read#1)", mp, | 2140 | xfs_ioerror_alert("xlog_recover_do..(read#1)", mp, |
2140 | bp, buf_f->blf_blkno); | 2141 | bp, buf_f->blf_blkno); |
2141 | error = XFS_BUF_GETERROR(bp); | ||
2142 | xfs_buf_relse(bp); | 2142 | xfs_buf_relse(bp); |
2143 | return error; | 2143 | return error; |
2144 | } | 2144 | } |
2145 | 2145 | ||
2146 | error = 0; | ||
2147 | if (buf_f->blf_flags & XFS_BLF_INODE_BUF) { | 2146 | if (buf_f->blf_flags & XFS_BLF_INODE_BUF) { |
2148 | error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); | 2147 | error = xlog_recover_do_inode_buffer(mp, item, bp, buf_f); |
2149 | } else if (buf_f->blf_flags & | 2148 | } else if (buf_f->blf_flags & |
@@ -2227,14 +2226,13 @@ xlog_recover_inode_pass2( | |||
2227 | 2226 | ||
2228 | bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len, | 2227 | bp = xfs_buf_read(mp->m_ddev_targp, in_f->ilf_blkno, in_f->ilf_len, |
2229 | XBF_LOCK); | 2228 | XBF_LOCK); |
2230 | if (XFS_BUF_ISERROR(bp)) { | 2229 | error = xfs_buf_geterror(bp); |
2230 | if (error) { | ||
2231 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, | 2231 | xfs_ioerror_alert("xlog_recover_do..(read#2)", mp, |
2232 | bp, in_f->ilf_blkno); | 2232 | bp, in_f->ilf_blkno); |
2233 | error = XFS_BUF_GETERROR(bp); | ||
2234 | xfs_buf_relse(bp); | 2233 | xfs_buf_relse(bp); |
2235 | goto error; | 2234 | goto error; |
2236 | } | 2235 | } |
2237 | error = 0; | ||
2238 | ASSERT(in_f->ilf_fields & XFS_ILOG_CORE); | 2236 | ASSERT(in_f->ilf_fields & XFS_ILOG_CORE); |
2239 | dip = (xfs_dinode_t *)xfs_buf_offset(bp, in_f->ilf_boffset); | 2237 | dip = (xfs_dinode_t *)xfs_buf_offset(bp, in_f->ilf_boffset); |
2240 | 2238 | ||
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 8f76fdff4f46..cb8132cb37ea 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c | |||
@@ -883,7 +883,7 @@ xfs_rtbuf_get( | |||
883 | if (error) { | 883 | if (error) { |
884 | return error; | 884 | return error; |
885 | } | 885 | } |
886 | ASSERT(bp && !XFS_BUF_GETERROR(bp)); | 886 | ASSERT(!xfs_buf_geterror(bp)); |
887 | *bpp = bp; | 887 | *bpp = bp; |
888 | return 0; | 888 | return 0; |
889 | } | 889 | } |
diff --git a/fs/xfs/xfs_rw.c b/fs/xfs/xfs_rw.c index d6d6fdfe9422..d1f76f8a4c7e 100644 --- a/fs/xfs/xfs_rw.c +++ b/fs/xfs/xfs_rw.c | |||
@@ -106,7 +106,7 @@ xfs_ioerror_alert( | |||
106 | " (\"%s\") error %d buf count %zd", | 106 | " (\"%s\") error %d buf count %zd", |
107 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), | 107 | XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)), |
108 | (__uint64_t)blkno, func, | 108 | (__uint64_t)blkno, func, |
109 | XFS_BUF_GETERROR(bp), XFS_BUF_COUNT(bp)); | 109 | bp->b_error, XFS_BUF_COUNT(bp)); |
110 | } | 110 | } |
111 | 111 | ||
112 | /* | 112 | /* |
@@ -137,8 +137,8 @@ xfs_read_buf( | |||
137 | bp = xfs_buf_read(target, blkno, len, flags); | 137 | bp = xfs_buf_read(target, blkno, len, flags); |
138 | if (!bp) | 138 | if (!bp) |
139 | return XFS_ERROR(EIO); | 139 | return XFS_ERROR(EIO); |
140 | error = XFS_BUF_GETERROR(bp); | 140 | error = bp->b_error; |
141 | if (bp && !error && !XFS_FORCED_SHUTDOWN(mp)) { | 141 | if (!error && !XFS_FORCED_SHUTDOWN(mp)) { |
142 | *bpp = bp; | 142 | *bpp = bp; |
143 | } else { | 143 | } else { |
144 | *bpp = NULL; | 144 | *bpp = NULL; |
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 1bc04d4e7eb1..f9f1bf6ab4b8 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -194,7 +194,7 @@ xfs_trans_get_buf(xfs_trans_t *tp, | |||
194 | return NULL; | 194 | return NULL; |
195 | } | 195 | } |
196 | 196 | ||
197 | ASSERT(!XFS_BUF_GETERROR(bp)); | 197 | ASSERT(!bp->b_error); |
198 | 198 | ||
199 | _xfs_trans_bjoin(tp, bp, 1); | 199 | _xfs_trans_bjoin(tp, bp, 1); |
200 | trace_xfs_trans_get_buf(bp->b_fspriv); | 200 | trace_xfs_trans_get_buf(bp->b_fspriv); |
@@ -293,10 +293,10 @@ xfs_trans_read_buf( | |||
293 | return (flags & XBF_TRYLOCK) ? | 293 | return (flags & XBF_TRYLOCK) ? |
294 | EAGAIN : XFS_ERROR(ENOMEM); | 294 | EAGAIN : XFS_ERROR(ENOMEM); |
295 | 295 | ||
296 | if (XFS_BUF_GETERROR(bp) != 0) { | 296 | if (bp->b_error) { |
297 | error = bp->b_error; | ||
297 | xfs_ioerror_alert("xfs_trans_read_buf", mp, | 298 | xfs_ioerror_alert("xfs_trans_read_buf", mp, |
298 | bp, blkno); | 299 | bp, blkno); |
299 | error = XFS_BUF_GETERROR(bp); | ||
300 | xfs_buf_relse(bp); | 300 | xfs_buf_relse(bp); |
301 | return error; | 301 | return error; |
302 | } | 302 | } |
@@ -330,7 +330,7 @@ xfs_trans_read_buf( | |||
330 | ASSERT(xfs_buf_islocked(bp)); | 330 | ASSERT(xfs_buf_islocked(bp)); |
331 | ASSERT(bp->b_transp == tp); | 331 | ASSERT(bp->b_transp == tp); |
332 | ASSERT(bp->b_fspriv != NULL); | 332 | ASSERT(bp->b_fspriv != NULL); |
333 | ASSERT((XFS_BUF_ISERROR(bp)) == 0); | 333 | ASSERT(!bp->b_error); |
334 | if (!(XFS_BUF_ISDONE(bp))) { | 334 | if (!(XFS_BUF_ISDONE(bp))) { |
335 | trace_xfs_trans_read_buf_io(bp, _RET_IP_); | 335 | trace_xfs_trans_read_buf_io(bp, _RET_IP_); |
336 | ASSERT(!XFS_BUF_ISASYNC(bp)); | 336 | ASSERT(!XFS_BUF_ISASYNC(bp)); |
@@ -386,10 +386,9 @@ xfs_trans_read_buf( | |||
386 | return (flags & XBF_TRYLOCK) ? | 386 | return (flags & XBF_TRYLOCK) ? |
387 | 0 : XFS_ERROR(ENOMEM); | 387 | 0 : XFS_ERROR(ENOMEM); |
388 | } | 388 | } |
389 | if (XFS_BUF_GETERROR(bp) != 0) { | 389 | if (bp->b_error) { |
390 | XFS_BUF_SUPER_STALE(bp); | 390 | error = bp->b_error; |
391 | error = XFS_BUF_GETERROR(bp); | 391 | XFS_BUF_SUPER_STALE(bp); |
392 | |||
393 | xfs_ioerror_alert("xfs_trans_read_buf", mp, | 392 | xfs_ioerror_alert("xfs_trans_read_buf", mp, |
394 | bp, blkno); | 393 | bp, blkno); |
395 | if (tp->t_flags & XFS_TRANS_DIRTY) | 394 | if (tp->t_flags & XFS_TRANS_DIRTY) |
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 88d121486c52..3baebe280f10 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -83,7 +83,7 @@ xfs_readlink_bmap( | |||
83 | 83 | ||
84 | bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), | 84 | bp = xfs_buf_read(mp->m_ddev_targp, d, BTOBB(byte_cnt), |
85 | XBF_LOCK | XBF_MAPPED | XBF_DONT_BLOCK); | 85 | XBF_LOCK | XBF_MAPPED | XBF_DONT_BLOCK); |
86 | error = XFS_BUF_GETERROR(bp); | 86 | error = xfs_buf_geterror(bp); |
87 | if (error) { | 87 | if (error) { |
88 | xfs_ioerror_alert("xfs_readlink", | 88 | xfs_ioerror_alert("xfs_readlink", |
89 | ip->i_mount, bp, XFS_BUF_ADDR(bp)); | 89 | ip->i_mount, bp, XFS_BUF_ADDR(bp)); |
@@ -1648,7 +1648,7 @@ xfs_symlink( | |||
1648 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); | 1648 | byte_cnt = XFS_FSB_TO_B(mp, mval[n].br_blockcount); |
1649 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, | 1649 | bp = xfs_trans_get_buf(tp, mp->m_ddev_targp, d, |
1650 | BTOBB(byte_cnt), 0); | 1650 | BTOBB(byte_cnt), 0); |
1651 | ASSERT(bp && !XFS_BUF_GETERROR(bp)); | 1651 | ASSERT(!xfs_buf_geterror(bp)); |
1652 | if (pathlen < byte_cnt) { | 1652 | if (pathlen < byte_cnt) { |
1653 | byte_cnt = pathlen; | 1653 | byte_cnt = pathlen; |
1654 | } | 1654 | } |