aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-07-13 07:43:49 -0400
committerChristoph Hellwig <hch@lst.de>2011-07-13 07:43:49 -0400
commitbf9d9013a2a559858efb590bf922377be9d6d969 (patch)
treed6c30253605901475db0110c61c25e9d139d20d4 /fs/xfs/xfs_log.c
parent77936d0280616d84d1eb0eb38a6f857d2827a434 (diff)
xfs: add a proper transaction pointer to struct xfs_buf
Replace the typeless b_fspriv2 and the ugly macros around it with a properly typed transaction pointer. As a fallout the log buffer state debug checks are also removed. We could have kept them using casts, but as they do not have a real purpose we can as well just remove them. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 0ef5eb677383..82c797dd6520 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -876,8 +876,6 @@ xlog_iodone(xfs_buf_t *bp)
876 int aborted; 876 int aborted;
877 877
878 iclog = XFS_BUF_FSPRIVATE(bp, xlog_in_core_t *); 878 iclog = XFS_BUF_FSPRIVATE(bp, xlog_in_core_t *);
879 ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long) 2);
880 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
881 aborted = 0; 879 aborted = 0;
882 l = iclog->ic_log; 880 l = iclog->ic_log;
883 881
@@ -1057,7 +1055,6 @@ xlog_alloc_log(xfs_mount_t *mp,
1057 if (!bp) 1055 if (!bp)
1058 goto out_free_log; 1056 goto out_free_log;
1059 XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone); 1057 XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
1060 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
1061 ASSERT(XFS_BUF_ISBUSY(bp)); 1058 ASSERT(XFS_BUF_ISBUSY(bp));
1062 ASSERT(xfs_buf_islocked(bp)); 1059 ASSERT(xfs_buf_islocked(bp));
1063 log->l_xbuf = bp; 1060 log->l_xbuf = bp;
@@ -1092,7 +1089,6 @@ xlog_alloc_log(xfs_mount_t *mp,
1092 goto out_free_iclog; 1089 goto out_free_iclog;
1093 1090
1094 XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone); 1091 XFS_BUF_SET_IODONE_FUNC(bp, xlog_iodone);
1095 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
1096 iclog->ic_bp = bp; 1092 iclog->ic_bp = bp;
1097 iclog->ic_data = bp->b_addr; 1093 iclog->ic_data = bp->b_addr;
1098#ifdef DEBUG 1094#ifdef DEBUG
@@ -1349,8 +1345,6 @@ xlog_sync(xlog_t *log,
1349 } 1345 }
1350 1346
1351 bp = iclog->ic_bp; 1347 bp = iclog->ic_bp;
1352 ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long)1);
1353 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)2);
1354 XFS_BUF_SET_ADDR(bp, BLOCK_LSN(be64_to_cpu(iclog->ic_header.h_lsn))); 1348 XFS_BUF_SET_ADDR(bp, BLOCK_LSN(be64_to_cpu(iclog->ic_header.h_lsn)));
1355 1349
1356 XFS_STATS_ADD(xs_log_blocks, BTOBB(count)); 1350 XFS_STATS_ADD(xs_log_blocks, BTOBB(count));
@@ -1408,9 +1402,6 @@ xlog_sync(xlog_t *log,
1408 } 1402 }
1409 if (split) { 1403 if (split) {
1410 bp = iclog->ic_log->l_xbuf; 1404 bp = iclog->ic_log->l_xbuf;
1411 ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) ==
1412 (unsigned long)1);
1413 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)2);
1414 XFS_BUF_SET_ADDR(bp, 0); /* logical 0 */ 1405 XFS_BUF_SET_ADDR(bp, 0); /* logical 0 */
1415 XFS_BUF_SET_PTR(bp, (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+ 1406 XFS_BUF_SET_PTR(bp, (xfs_caddr_t)((__psint_t)&(iclog->ic_header)+
1416 (__psint_t)count), split); 1407 (__psint_t)count), split);