xfs
[Top] [All Lists]

[PATCH 1/2] repair: fix XR_BLD_FREE_TRACE compilation errors

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/2] repair: fix XR_BLD_FREE_TRACE compilation errors
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 29 Oct 2014 14:09:03 +1100
Cc: bvowk@xxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1414552144-12627-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1414552144-12627-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

Obviously hasn't been used for quite some time, so fix the
build problems and make it useful again.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 repair/phase5.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/repair/phase5.c b/repair/phase5.c
index e82eeb7..d6d3c6d 100644
--- a/repair/phase5.c
+++ b/repair/phase5.c
@@ -362,10 +362,6 @@ calculate_freespace_cursor(xfs_mount_t *mp, xfs_agnumber_t 
agno,
        extent_tree_node_t      *ext_ptr;
        int                     level;
 #ifdef XR_BLD_FREE_TRACE
-       int                     old_state;
-       int                     state = XR_E_BAD_STATE;
-#endif
-#ifdef XR_BLD_FREE_TRACE
        fprintf(stderr,
                "in init_freespace_cursor, agno = %d\n", agno);
 #endif
@@ -1292,8 +1288,8 @@ build_agf_agfl(xfs_mount_t        *mp,
        memset(agf, 0, mp->m_sb.sb_sectsize);
 
 #ifdef XR_BLD_FREE_TRACE
-       fprintf(stderr, "agf = 0x%x, agf_buf->b_un.b_addr = 0x%x\n",
-               (__psint_t) agf, (__psint_t) agf_buf->b_un.b_addr);
+       fprintf(stderr, "agf = 0x%p, agf_buf->b_addr = 0x%p\n",
+               agf, agf_buf->b_addr);
 #endif
 
        /*
@@ -1452,7 +1448,7 @@ build_agf_agfl(xfs_mount_t        *mp,
        }
 
 #ifdef XR_BLD_FREE_TRACE
-       fprintf(stderr, "wrote agf for ag %u, error = %d\n", agno, error);
+       fprintf(stderr, "wrote agf for ag %u\n", agno);
 #endif
 }
 
@@ -1707,11 +1703,10 @@ phase5(xfs_mount_t *mp)
 #ifdef XR_BLD_FREE_TRACE
        fprintf(stderr, "inobt level 1, maxrec = %d, minrec = %d\n",
                xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, 0),
-               xfs_inobt_maxrecs(mp->m_sb.sb_blocksize, 0) / 2
-               );
+               xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, 0) / 2);
        fprintf(stderr, "inobt level 0 (leaf), maxrec = %d, minrec = %d\n",
-               xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, xfs_inobt, 1),
-               xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, xfs_inobt, 1) / 2);
+               xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, 1),
+               xfs_inobt_maxrecs(mp, mp->m_sb.sb_blocksize, 1) / 2);
        fprintf(stderr, "xr inobt level 0 (leaf), maxrec = %d\n",
                XR_INOBT_BLOCK_MAXRECS(mp, 0));
        fprintf(stderr, "xr inobt level 1 (int), maxrec = %d\n",
-- 
2.0.0

<Prev in Thread] Current Thread [Next in Thread>