diff options
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index 137e2b9e2948..475a4ded4f41 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -160,8 +160,10 @@ 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_DONE(bp); | ||
166 | } | ||
165 | 167 | ||
166 | /* | 168 | /* |
167 | * If the buffer is stale then it was binval'ed | 169 | * If the buffer is stale then it was binval'ed |
@@ -294,8 +296,7 @@ xfs_trans_read_buf( | |||
294 | 296 | ||
295 | if (bp->b_error) { | 297 | if (bp->b_error) { |
296 | error = bp->b_error; | 298 | error = bp->b_error; |
297 | xfs_ioerror_alert("xfs_trans_read_buf", mp, | 299 | xfs_buf_ioerror_alert(bp, __func__); |
298 | bp, blkno); | ||
299 | xfs_buf_relse(bp); | 300 | xfs_buf_relse(bp); |
300 | return error; | 301 | return error; |
301 | } | 302 | } |
@@ -337,8 +338,7 @@ xfs_trans_read_buf( | |||
337 | xfsbdstrat(tp->t_mountp, bp); | 338 | xfsbdstrat(tp->t_mountp, bp); |
338 | error = xfs_buf_iowait(bp); | 339 | error = xfs_buf_iowait(bp); |
339 | if (error) { | 340 | if (error) { |
340 | xfs_ioerror_alert("xfs_trans_read_buf", mp, | 341 | xfs_buf_ioerror_alert(bp, __func__); |
341 | bp, blkno); | ||
342 | xfs_buf_relse(bp); | 342 | xfs_buf_relse(bp); |
343 | /* | 343 | /* |
344 | * We can gracefully recover from most read | 344 | * We can gracefully recover from most read |
@@ -387,9 +387,9 @@ xfs_trans_read_buf( | |||
387 | } | 387 | } |
388 | if (bp->b_error) { | 388 | if (bp->b_error) { |
389 | error = bp->b_error; | 389 | error = bp->b_error; |
390 | XFS_BUF_SUPER_STALE(bp); | 390 | xfs_buf_stale(bp); |
391 | xfs_ioerror_alert("xfs_trans_read_buf", mp, | 391 | XFS_BUF_DONE(bp); |
392 | bp, blkno); | 392 | xfs_buf_ioerror_alert(bp, __func__); |
393 | if (tp->t_flags & XFS_TRANS_DIRTY) | 393 | if (tp->t_flags & XFS_TRANS_DIRTY) |
394 | xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR); | 394 | xfs_force_shutdown(tp->t_mountp, SHUTDOWN_META_IO_ERROR); |
395 | xfs_buf_relse(bp); | 395 | xfs_buf_relse(bp); |
@@ -643,13 +643,14 @@ xfs_trans_log_buf(xfs_trans_t *tp, | |||
643 | * inside the b_bdstrat callback so that this won't get written to | 643 | * inside the b_bdstrat callback so that this won't get written to |
644 | * disk. | 644 | * disk. |
645 | */ | 645 | */ |
646 | XFS_BUF_DELAYWRITE(bp); | ||
647 | XFS_BUF_DONE(bp); | 646 | XFS_BUF_DONE(bp); |
648 | 647 | ||
649 | ASSERT(atomic_read(&bip->bli_refcount) > 0); | 648 | ASSERT(atomic_read(&bip->bli_refcount) > 0); |
650 | bp->b_iodone = xfs_buf_iodone_callbacks; | 649 | bp->b_iodone = xfs_buf_iodone_callbacks; |
651 | bip->bli_item.li_cb = xfs_buf_iodone; | 650 | bip->bli_item.li_cb = xfs_buf_iodone; |
652 | 651 | ||
652 | xfs_buf_delwri_queue(bp); | ||
653 | |||
653 | trace_xfs_trans_log_buf(bip); | 654 | trace_xfs_trans_log_buf(bip); |
654 | 655 | ||
655 | /* | 656 | /* |
@@ -738,8 +739,7 @@ xfs_trans_binval( | |||
738 | * We set the stale bit in the buffer as well since we're getting | 739 | * We set the stale bit in the buffer as well since we're getting |
739 | * rid of it. | 740 | * rid of it. |
740 | */ | 741 | */ |
741 | XFS_BUF_UNDELAYWRITE(bp); | 742 | xfs_buf_stale(bp); |
742 | XFS_BUF_STALE(bp); | ||
743 | bip->bli_flags |= XFS_BLI_STALE; | 743 | bip->bli_flags |= XFS_BLI_STALE; |
744 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); | 744 | bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); |
745 | bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; | 745 | bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; |