aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 06ff8437ed8e..3a8d4f66d702 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);
@@ -1051,7 +1051,6 @@ xlog_alloc_log(xfs_mount_t *mp,
1051 if (!bp) 1051 if (!bp)
1052 goto out_free_log; 1052 goto out_free_log;
1053 bp->b_iodone = xlog_iodone; 1053 bp->b_iodone = xlog_iodone;
1054 ASSERT(XFS_BUF_ISBUSY(bp));
1055 ASSERT(xfs_buf_islocked(bp)); 1054 ASSERT(xfs_buf_islocked(bp));
1056 log->l_xbuf = bp; 1055 log->l_xbuf = bp;
1057 1056
@@ -1108,7 +1107,6 @@ xlog_alloc_log(xfs_mount_t *mp,
1108 iclog->ic_callback_tail = &(iclog->ic_callback); 1107 iclog->ic_callback_tail = &(iclog->ic_callback);
1109 iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize; 1108 iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize;
1110 1109
1111 ASSERT(XFS_BUF_ISBUSY(iclog->ic_bp));
1112 ASSERT(xfs_buf_islocked(iclog->ic_bp)); 1110 ASSERT(xfs_buf_islocked(iclog->ic_bp));
1113 init_waitqueue_head(&iclog->ic_force_wait); 1111 init_waitqueue_head(&iclog->ic_force_wait);
1114 init_waitqueue_head(&iclog->ic_write_wait); 1112 init_waitqueue_head(&iclog->ic_write_wait);
@@ -1248,7 +1246,7 @@ xlog_bdstrat(
1248 struct xlog_in_core *iclog = bp->b_fspriv; 1246 struct xlog_in_core *iclog = bp->b_fspriv;
1249 1247
1250 if (iclog->ic_state & XLOG_STATE_IOERROR) { 1248 if (iclog->ic_state & XLOG_STATE_IOERROR) {
1251 XFS_BUF_ERROR(bp, EIO); 1249 xfs_buf_ioerror(bp, EIO);
1252 XFS_BUF_STALE(bp); 1250 XFS_BUF_STALE(bp);
1253 xfs_buf_ioend(bp, 0); 1251 xfs_buf_ioend(bp, 0);
1254 /* 1252 /*
@@ -1355,7 +1353,6 @@ xlog_sync(xlog_t *log,
1355 XFS_BUF_SET_COUNT(bp, count); 1353 XFS_BUF_SET_COUNT(bp, count);
1356 bp->b_fspriv = iclog; 1354 bp->b_fspriv = iclog;
1357 XFS_BUF_ZEROFLAGS(bp); 1355 XFS_BUF_ZEROFLAGS(bp);
1358 XFS_BUF_BUSY(bp);
1359 XFS_BUF_ASYNC(bp); 1356 XFS_BUF_ASYNC(bp);
1360 bp->b_flags |= XBF_SYNCIO; 1357 bp->b_flags |= XBF_SYNCIO;
1361 1358
@@ -1398,16 +1395,15 @@ xlog_sync(xlog_t *log,
1398 if (split) { 1395 if (split) {
1399 bp = iclog->ic_log->l_xbuf; 1396 bp = iclog->ic_log->l_xbuf;
1400 XFS_BUF_SET_ADDR(bp, 0); /* logical 0 */ 1397 XFS_BUF_SET_ADDR(bp, 0); /* logical 0 */
1401 XFS_BUF_SET_PTR(bp, (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+ 1398 xfs_buf_associate_memory(bp,
1402 (__psint_t)count), split); 1399 (char *)&iclog->ic_header + count, split);
1403 bp->b_fspriv = iclog; 1400 bp->b_fspriv = iclog;
1404 XFS_BUF_ZEROFLAGS(bp); 1401 XFS_BUF_ZEROFLAGS(bp);
1405 XFS_BUF_BUSY(bp);
1406 XFS_BUF_ASYNC(bp); 1402 XFS_BUF_ASYNC(bp);
1407 bp->b_flags |= XBF_SYNCIO; 1403 bp->b_flags |= XBF_SYNCIO;
1408 if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) 1404 if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
1409 bp->b_flags |= XBF_FUA; 1405 bp->b_flags |= XBF_FUA;
1410 dptr = XFS_BUF_PTR(bp); 1406 dptr = bp->b_addr;
1411 /* 1407 /*
1412 * Bump the cycle numbers at the start of each block 1408 * Bump the cycle numbers at the start of each block
1413 * since this part of the buffer is at the start of 1409 * since this part of the buffer is at the start of