aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.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_recover.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_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index d94987915d5e..9abb96a7674d 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -3332,7 +3332,6 @@ xlog_pack_data(
3332 int size = iclog->ic_offset + roundoff; 3332 int size = iclog->ic_offset + roundoff;
3333 __be32 cycle_lsn; 3333 __be32 cycle_lsn;
3334 xfs_caddr_t dp; 3334 xfs_caddr_t dp;
3335 xlog_in_core_2_t *xhdr;
3336 3335
3337 xlog_pack_data_checksum(log, iclog, size); 3336 xlog_pack_data_checksum(log, iclog, size);
3338 3337
@@ -3347,7 +3346,8 @@ xlog_pack_data(
3347 } 3346 }
3348 3347
3349 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { 3348 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) {
3350 xhdr = (xlog_in_core_2_t *)&iclog->ic_header; 3349 xlog_in_core_2_t *xhdr = iclog->ic_data;
3350
3351 for ( ; i < BTOBB(size); i++) { 3351 for ( ; i < BTOBB(size); i++) {
3352 j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE); 3352 j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
3353 k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE); 3353 k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
@@ -3405,7 +3405,6 @@ xlog_unpack_data(
3405 xlog_t *log) 3405 xlog_t *log)
3406{ 3406{
3407 int i, j, k; 3407 int i, j, k;
3408 xlog_in_core_2_t *xhdr;
3409 3408
3410 for (i = 0; i < BTOBB(be32_to_cpu(rhead->h_len)) && 3409 for (i = 0; i < BTOBB(be32_to_cpu(rhead->h_len)) &&
3411 i < (XLOG_HEADER_CYCLE_SIZE / BBSIZE); i++) { 3410 i < (XLOG_HEADER_CYCLE_SIZE / BBSIZE); i++) {
@@ -3414,7 +3413,7 @@ xlog_unpack_data(
3414 } 3413 }
3415 3414
3416 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) { 3415 if (xfs_sb_version_haslogv2(&log->l_mp->m_sb)) {
3417 xhdr = (xlog_in_core_2_t *)rhead; 3416 xlog_in_core_2_t *xhdr = (xlog_in_core_2_t *)rhead;
3418 for ( ; i < BTOBB(be32_to_cpu(rhead->h_len)); i++) { 3417 for ( ; i < BTOBB(be32_to_cpu(rhead->h_len)); i++) {
3419 j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE); 3418 j = i / (XLOG_HEADER_CYCLE_SIZE / BBSIZE);
3420 k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE); 3419 k = i % (XLOG_HEADER_CYCLE_SIZE / BBSIZE);