aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2008-11-27 22:23:38 -0500
committerNiv Sardi <xaiki@sgi.com>2008-11-30 19:37:25 -0500
commitb28708d6a0a3ed65a68f0dcd8e6d1c09f14e5cf3 (patch)
tree991ac374564600a60bb940e9c8c4b1315101fa14 /fs/xfs/xfs_log.c
parent4805621a37d9b2b16641b5c68597651419e9e252 (diff)
[XFS] sanitize xlog_in_core_t definition
Move all fields from xlog_iclog_fields_t into xlog_in_core_t instead of having them in a substructure and the using #defines to make it look like they were directly in xlog_in_core_t. Also document that xlog_in_core_2_t is grossly misnamed, and make all references to it typesafe. (First sent on Semptember 15th) Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Niv Sardi <xaiki@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r--fs/xfs/xfs_log.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 8a5b05536a28..aadaa1472f69 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1029,12 +1029,6 @@ xlog_iodone(xfs_buf_t *bp)
1029 ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long) 2); 1029 ASSERT(XFS_BUF_FSPRIVATE2(bp, unsigned long) == (unsigned long) 2);
1030 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); 1030 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
1031 aborted = 0; 1031 aborted = 0;
1032
1033 /*
1034 * Some versions of cpp barf on the recursive definition of
1035 * ic_log -> hic_fields.ic_log and expand ic_log twice when
1036 * it is passed through two macros. Workaround broken cpp.
1037 */
1038 l = iclog->ic_log; 1032 l = iclog->ic_log;
1039 1033
1040 /* 1034 /*
@@ -1301,7 +1295,7 @@ xlog_alloc_log(xfs_mount_t *mp,
1301 XFS_BUF_SET_BDSTRAT_FUNC(bp, xlog_bdstrat_cb); 1295 XFS_BUF_SET_BDSTRAT_FUNC(bp, xlog_bdstrat_cb);
1302 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1); 1296 XFS_BUF_SET_FSPRIVATE2(bp, (unsigned long)1);
1303 iclog->ic_bp = bp; 1297 iclog->ic_bp = bp;
1304 iclog->hic_data = bp->b_addr; 1298 iclog->ic_data = bp->b_addr;
1305#ifdef DEBUG 1299#ifdef DEBUG
1306 log->l_iclog_bak[i] = (xfs_caddr_t)&(iclog->ic_header); 1300 log->l_iclog_bak[i] = (xfs_caddr_t)&(iclog->ic_header);
1307#endif 1301#endif
@@ -1321,7 +1315,7 @@ xlog_alloc_log(xfs_mount_t *mp,
1321 atomic_set(&iclog->ic_refcnt, 0); 1315 atomic_set(&iclog->ic_refcnt, 0);
1322 spin_lock_init(&iclog->ic_callback_lock); 1316 spin_lock_init(&iclog->ic_callback_lock);
1323 iclog->ic_callback_tail = &(iclog->ic_callback); 1317 iclog->ic_callback_tail = &(iclog->ic_callback);
1324 iclog->ic_datap = (char *)iclog->hic_data + log->l_iclog_hsize; 1318 iclog->ic_datap = (char *)iclog->ic_data + log->l_iclog_hsize;
1325 1319
1326 ASSERT(XFS_BUF_ISBUSY(iclog->ic_bp)); 1320 ASSERT(XFS_BUF_ISBUSY(iclog->ic_bp));
1327 ASSERT(XFS_BUF_VALUSEMA(iclog->ic_bp) <= 0); 1321 ASSERT(XFS_BUF_VALUSEMA(iclog->ic_bp) <= 0);
@@ -3463,7 +3457,7 @@ xlog_verify_iclog(xlog_t *log,
3463 ptr = iclog->ic_datap; 3457 ptr = iclog->ic_datap;
3464 base_ptr = ptr; 3458 base_ptr = ptr;
3465 ophead = (xlog_op_header_t *)ptr; 3459 ophead = (xlog_op_header_t *)ptr;
3466 xhdr = (xlog_in_core_2_t *)&iclog->ic_header; 3460 xhdr = iclog->ic_data;
3467 for (i = 0; i < len; i++) { 3461 for (i = 0; i < len; i++) {
3468 ophead = (xlog_op_header_t *)ptr; 3462 ophead = (xlog_op_header_t *)ptr;
3469 3463