diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-19 12:29:12 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-23 09:08:01 -0700 |
commit | 032d91f9820f6d241dc5584c27a668cfd377aaf0 (patch) | |
tree | af9ed13b2a9e85cca186d9e38d71dda69b1f2119 | |
parent | 1d8a748a8aa94a7da8f3d4fac1892037890d3cff (diff) |
xfs: fix indentation and other whitespace problems in scrub/repair
Now that we've shortened everything, fix up all the indentation and
whitespace problems. There are no functional changes.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
-rw-r--r-- | fs/xfs/scrub/agheader.c | 172 | ||||
-rw-r--r-- | fs/xfs/scrub/agheader_repair.c | 8 | ||||
-rw-r--r-- | fs/xfs/scrub/alloc.c | 48 | ||||
-rw-r--r-- | fs/xfs/scrub/attr.c | 20 | ||||
-rw-r--r-- | fs/xfs/scrub/bmap.c | 150 | ||||
-rw-r--r-- | fs/xfs/scrub/btree.c | 172 | ||||
-rw-r--r-- | fs/xfs/scrub/btree.h | 25 | ||||
-rw-r--r-- | fs/xfs/scrub/common.c | 158 | ||||
-rw-r--r-- | fs/xfs/scrub/common.h | 23 | ||||
-rw-r--r-- | fs/xfs/scrub/dabtree.c | 56 | ||||
-rw-r--r-- | fs/xfs/scrub/dabtree.h | 21 | ||||
-rw-r--r-- | fs/xfs/scrub/dir.c | 88 | ||||
-rw-r--r-- | fs/xfs/scrub/ialloc.c | 58 | ||||
-rw-r--r-- | fs/xfs/scrub/inode.c | 102 | ||||
-rw-r--r-- | fs/xfs/scrub/parent.c | 60 | ||||
-rw-r--r-- | fs/xfs/scrub/quota.c | 68 | ||||
-rw-r--r-- | fs/xfs/scrub/refcount.c | 70 | ||||
-rw-r--r-- | fs/xfs/scrub/repair.c | 148 | ||||
-rw-r--r-- | fs/xfs/scrub/repair.h | 28 | ||||
-rw-r--r-- | fs/xfs/scrub/rmap.c | 78 | ||||
-rw-r--r-- | fs/xfs/scrub/rtbitmap.c | 38 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.c | 8 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.h | 62 | ||||
-rw-r--r-- | fs/xfs/scrub/symlink.c | 10 | ||||
-rw-r--r-- | fs/xfs/scrub/trace.c | 4 |
25 files changed, 832 insertions, 843 deletions
diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c index 14ba4189ae8f..3068a9382feb 100644 --- a/fs/xfs/scrub/agheader.c +++ b/fs/xfs/scrub/agheader.c @@ -30,13 +30,13 @@ STATIC void xchk_superblock_xref( struct xfs_scrub *sc, - struct xfs_buf *bp) + struct xfs_buf *bp) { - struct xfs_owner_info oinfo; - struct xfs_mount *mp = sc->mp; - xfs_agnumber_t agno = sc->sm->sm_agno; - xfs_agblock_t agbno; - int error; + struct xfs_owner_info oinfo; + struct xfs_mount *mp = sc->mp; + xfs_agnumber_t agno = sc->sm->sm_agno; + xfs_agblock_t agbno; + int error; if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -68,14 +68,14 @@ int xchk_superblock( struct xfs_scrub *sc) { - struct xfs_mount *mp = sc->mp; - struct xfs_buf *bp; - struct xfs_dsb *sb; - xfs_agnumber_t agno; - uint32_t v2_ok; - __be32 features_mask; - int error; - __be16 vernum_mask; + struct xfs_mount *mp = sc->mp; + struct xfs_buf *bp; + struct xfs_dsb *sb; + xfs_agnumber_t agno; + uint32_t v2_ok; + __be32 features_mask; + int error; + __be16 vernum_mask; agno = sc->sm->sm_agno; if (agno == 0) @@ -367,9 +367,9 @@ static inline void xchk_agf_xref_freeblks( struct xfs_scrub *sc) { - struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); - xfs_extlen_t blocks = 0; - int error; + struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); + xfs_extlen_t blocks = 0; + int error; if (!sc->sa.bno_cur) return; @@ -387,11 +387,11 @@ static inline void xchk_agf_xref_cntbt( struct xfs_scrub *sc) { - struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); - xfs_agblock_t agbno; - xfs_extlen_t blocks; - int have; - int error; + struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); + xfs_agblock_t agbno; + xfs_extlen_t blocks; + int have; + int error; if (!sc->sa.cnt_cur) return; @@ -419,11 +419,11 @@ STATIC void xchk_agf_xref_btreeblks( struct xfs_scrub *sc) { - struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); - struct xfs_mount *mp = sc->mp; - xfs_agblock_t blocks; - xfs_agblock_t btreeblks; - int error; + struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); + struct xfs_mount *mp = sc->mp; + xfs_agblock_t blocks; + xfs_agblock_t btreeblks; + int error; /* Check agf_rmap_blocks; set up for agf_btreeblks check */ if (sc->sa.rmap_cur) { @@ -465,9 +465,9 @@ static inline void xchk_agf_xref_refcblks( struct xfs_scrub *sc) { - struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); - xfs_agblock_t blocks; - int error; + struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); + xfs_agblock_t blocks; + int error; if (!sc->sa.refc_cur) return; @@ -484,10 +484,10 @@ STATIC void xchk_agf_xref( struct xfs_scrub *sc) { - struct xfs_owner_info oinfo; - struct xfs_mount *mp = sc->mp; - xfs_agblock_t agbno; - int error; + struct xfs_owner_info oinfo; + struct xfs_mount *mp = sc->mp; + xfs_agblock_t agbno; + int error; if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -516,17 +516,17 @@ int xchk_agf( struct xfs_scrub *sc) { - struct xfs_mount *mp = sc->mp; - struct xfs_agf *agf; - xfs_agnumber_t agno; - xfs_agblock_t agbno; - xfs_agblock_t eoag; - xfs_agblock_t agfl_first; - xfs_agblock_t agfl_last; - xfs_agblock_t agfl_count; - xfs_agblock_t fl_count; - int level; - int error = 0; + struct xfs_mount *mp = sc->mp; + struct xfs_agf *agf; + xfs_agnumber_t agno; + xfs_agblock_t agbno; + xfs_agblock_t eoag; + xfs_agblock_t agfl_first; + xfs_agblock_t agfl_last; + xfs_agblock_t agfl_count; + xfs_agblock_t fl_count; + int level; + int error = 0; agno = sc->sa.agno = sc->sm->sm_agno; error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, @@ -598,10 +598,10 @@ out: /* AGFL */ struct xchk_agfl_info { - struct xfs_owner_info oinfo; - unsigned int sz_entries; - unsigned int nr_entries; - xfs_agblock_t *entries; + struct xfs_owner_info oinfo; + unsigned int sz_entries; + unsigned int nr_entries; + xfs_agblock_t *entries; struct xfs_scrub *sc; }; @@ -609,8 +609,8 @@ struct xchk_agfl_info { STATIC void xchk_agfl_block_xref( struct xfs_scrub *sc, - xfs_agblock_t agbno, - struct xfs_owner_info *oinfo) + xfs_agblock_t agbno, + struct xfs_owner_info *oinfo) { if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -624,13 +624,13 @@ xchk_agfl_block_xref( /* Scrub an AGFL block. */ STATIC int xchk_agfl_block( - struct xfs_mount *mp, - xfs_agblock_t agbno, - void *priv) + struct xfs_mount *mp, + xfs_agblock_t agbno, + void *priv) { - struct xchk_agfl_info *sai = priv; + struct xchk_agfl_info *sai = priv; struct xfs_scrub *sc = sai->sc; - xfs_agnumber_t agno = sc->sa.agno; + xfs_agnumber_t agno = sc->sa.agno; if (xfs_verify_agbno(mp, agno, agbno) && sai->nr_entries < sai->sz_entries) @@ -662,10 +662,10 @@ STATIC void xchk_agfl_xref( struct xfs_scrub *sc) { - struct xfs_owner_info oinfo; - struct xfs_mount *mp = sc->mp; - xfs_agblock_t agbno; - int error; + struct xfs_owner_info oinfo; + struct xfs_mount *mp = sc->mp; + xfs_agblock_t agbno; + int error; if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -693,12 +693,12 @@ int xchk_agfl( struct xfs_scrub *sc) { - struct xchk_agfl_info sai; - struct xfs_agf *agf; - xfs_agnumber_t agno; - unsigned int agflcount; - unsigned int i; - int error; + struct xchk_agfl_info sai; + struct xfs_agf *agf; + xfs_agnumber_t agno; + unsigned int agflcount; + unsigned int i; + int error; agno = sc->sa.agno = sc->sm->sm_agno; error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, @@ -770,10 +770,10 @@ static inline void xchk_agi_xref_icounts( struct xfs_scrub *sc) { - struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); - xfs_agino_t icount; - xfs_agino_t freecount; - int error; + struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); + xfs_agino_t icount; + xfs_agino_t freecount; + int error; if (!sc->sa.ino_cur) return; @@ -791,10 +791,10 @@ STATIC void xchk_agi_xref( struct xfs_scrub *sc) { - struct xfs_owner_info oinfo; - struct xfs_mount *mp = sc->mp; - xfs_agblock_t agbno; - int error; + struct xfs_owner_info oinfo; + struct xfs_mount *mp = sc->mp; + xfs_agblock_t agbno; + int error; if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -820,18 +820,18 @@ int xchk_agi( struct xfs_scrub *sc) { - struct xfs_mount *mp = sc->mp; - struct xfs_agi *agi; - xfs_agnumber_t agno; - xfs_agblock_t agbno; - xfs_agblock_t eoag; - xfs_agino_t agino; - xfs_agino_t first_agino; - xfs_agino_t last_agino; - xfs_agino_t icount; - int i; - int level; - int error = 0; + struct xfs_mount *mp = sc->mp; + struct xfs_agi *agi; + xfs_agnumber_t agno; + xfs_agblock_t agbno; + xfs_agblock_t eoag; + xfs_agino_t agino; + xfs_agino_t first_agino; + xfs_agino_t last_agino; + xfs_agino_t icount; + int i; + int level; + int error = 0; agno = sc->sa.agno = sc->sm->sm_agno; error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp, diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 2457968482f8..1e96621ece3a 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c @@ -31,10 +31,10 @@ int xrep_superblock( struct xfs_scrub *sc) { - struct xfs_mount *mp = sc->mp; - struct xfs_buf *bp; - xfs_agnumber_t agno; - int error; + struct xfs_mount *mp = sc->mp; + struct xfs_buf *bp; + xfs_agnumber_t agno; + int error; /* Don't try to repair AG 0's sb; let xfs_repair deal with it. */ agno = sc->sm->sm_agno; diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c index 653d80b3aa39..036b5c7021eb 100644 --- a/fs/xfs/scrub/alloc.c +++ b/fs/xfs/scrub/alloc.c @@ -30,7 +30,7 @@ int xchk_setup_ag_allocbt( struct xfs_scrub *sc, - struct xfs_inode *ip) + struct xfs_inode *ip) { return xchk_setup_ag_btree(sc, ip, false); } @@ -43,14 +43,14 @@ xchk_setup_ag_allocbt( STATIC void xchk_allocbt_xref_other( struct xfs_scrub *sc, - xfs_agblock_t agbno, - xfs_extlen_t len) + xfs_agblock_t agbno, + xfs_extlen_t len) { - struct xfs_btree_cur **pcur; - xfs_agblock_t fbno; - xfs_extlen_t flen; - int has_otherrec; - int error; + struct xfs_btree_cur **pcur; + xfs_agblock_t fbno; + xfs_extlen_t flen; + int has_otherrec; + int error; if (sc->sm->sm_type == XFS_SCRUB_TYPE_BNOBT) pcur = &sc->sa.cnt_cur; @@ -83,8 +83,8 @@ xchk_allocbt_xref_other( STATIC void xchk_allocbt_xref( struct xfs_scrub *sc, - xfs_agblock_t agbno, - xfs_extlen_t len) + xfs_agblock_t agbno, + xfs_extlen_t len) { if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -98,14 +98,14 @@ xchk_allocbt_xref( /* Scrub a bnobt/cntbt record. */ STATIC int xchk_allocbt_rec( - struct xchk_btree *bs, - union xfs_btree_rec *rec) + struct xchk_btree *bs, + union xfs_btree_rec *rec) { - struct xfs_mount *mp = bs->cur->bc_mp; - xfs_agnumber_t agno = bs->cur->bc_private.a.agno; - xfs_agblock_t bno; - xfs_extlen_t len; - int error = 0; + struct xfs_mount *mp = bs->cur->bc_mp; + xfs_agnumber_t agno = bs->cur->bc_private.a.agno; + xfs_agblock_t bno; + xfs_extlen_t len; + int error = 0; bno = be32_to_cpu(rec->alloc.ar_startblock); len = be32_to_cpu(rec->alloc.ar_blockcount); @@ -124,10 +124,10 @@ xchk_allocbt_rec( STATIC int xchk_allocbt( struct xfs_scrub *sc, - xfs_btnum_t which) + xfs_btnum_t which) { - struct xfs_owner_info oinfo; - struct xfs_btree_cur *cur; + struct xfs_owner_info oinfo; + struct xfs_btree_cur *cur; xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG); cur = which == XFS_BTNUM_BNO ? sc->sa.bno_cur : sc->sa.cnt_cur; @@ -152,11 +152,11 @@ xchk_cntbt( void xchk_xref_is_used_space( struct xfs_scrub *sc, - xfs_agblock_t agbno, - xfs_extlen_t len) + xfs_agblock_t agbno, + xfs_extlen_t len) { - bool is_freesp; - int error; + bool is_freesp; + int error; if (!sc->sa.bno_cur || xchk_skip_xref(sc->sm)) return; diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c index 6650fb3010b6..81d5e90547a1 100644 --- a/fs/xfs/scrub/attr.c +++ b/fs/xfs/scrub/attr.c @@ -34,9 +34,9 @@ int xchk_setup_xattr( struct xfs_scrub *sc, - struct xfs_inode *ip) + struct xfs_inode *ip) { - size_t sz; + size_t sz; /* * Allocate the buffer without the inode lock held. We need enough @@ -57,7 +57,7 @@ xchk_setup_xattr( struct xchk_xattr { struct xfs_attr_list_context context; - struct xfs_scrub *sc; + struct xfs_scrub *sc; }; /* @@ -128,12 +128,12 @@ fail_xref: STATIC bool xchk_xattr_set_map( struct xfs_scrub *sc, - unsigned long *map, - unsigned int start, - unsigned int len) + unsigned long *map, + unsigned int start, + unsigned int len) { - unsigned int mapsize = sc->mp->m_attr_geo->blksize; - bool ret = true; + unsigned int mapsize = sc->mp->m_attr_geo->blksize; + bool ret = true; if (start >= mapsize) return false; @@ -155,7 +155,7 @@ xchk_xattr_set_map( */ STATIC bool xchk_xattr_check_freemap( - struct xfs_scrub *sc, + struct xfs_scrub *sc, unsigned long *map, struct xfs_attr3_icleaf_hdr *leafhdr) { @@ -405,7 +405,7 @@ out: /* Scrub the extended attribute metadata. */ int xchk_xattr( - struct xfs_scrub *sc) + struct xfs_scrub *sc) { struct xchk_xattr sx; struct attrlist_cursor_kern cursor = { 0 }; diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 0e5166232b15..e1d11f3223e3 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -35,9 +35,9 @@ int xchk_setup_inode_bmap( struct xfs_scrub *sc, - struct xfs_inode *ip) + struct xfs_inode *ip) { - int error; + int error; error = xchk_get_inode(sc, ip); if (error) @@ -80,25 +80,25 @@ out: struct xchk_bmap_info { struct xfs_scrub *sc; - xfs_fileoff_t lastoff; - bool is_rt; - bool is_shared; - int whichfork; + xfs_fileoff_t lastoff; + bool is_rt; + bool is_shared; + int whichfork; }; /* Look for a corresponding rmap for this irec. */ static inline bool xchk_bmap_get_rmap( - struct xchk_bmap_info *info, - struct xfs_bmbt_irec *irec, - xfs_agblock_t agbno, - uint64_t owner, - struct xfs_rmap_irec *rmap) + struct xchk_bmap_info *info, + struct xfs_bmbt_irec *irec, + xfs_agblock_t agbno, + uint64_t owner, + struct xfs_rmap_irec *rmap) { - xfs_fileoff_t offset; - unsigned int rflags = 0; - int has_rmap; - int error; + xfs_fileoff_t offset; + unsigned int rflags = 0; + int has_rmap; + int error; if (info->whichfork == XFS_ATTR_FORK) rflags |= XFS_RMAP_ATTR_FORK; @@ -152,13 +152,13 @@ out: /* Make sure that we have rmapbt records for this extent. */ STATIC void xchk_bmap_xref_rmap( - struct xchk_bmap_info *info, - struct xfs_bmbt_irec *irec, - xfs_agblock_t agbno) + struct xchk_bmap_info *info, + struct xfs_bmbt_irec *irec, + xfs_agblock_t agbno) { - struct xfs_rmap_irec rmap; - unsigned long long rmap_end; - uint64_t owner; + struct xfs_rmap_irec rmap; + unsigned long long rmap_end; + uint64_t owner; if (!info->sc->sa.rmap_cur || xchk_skip_xref(info->sc->sm)) return; @@ -222,10 +222,10 @@ xchk_bmap_xref_rmap( /* Cross-reference a single rtdev extent record. */ STATIC void xchk_bmap_rt_extent_xref( - struct xchk_bmap_info *info, - struct xfs_inode *ip, - struct xfs_btree_cur *cur, - struct xfs_bmbt_irec *irec) + struct xchk_bmap_info *info, + struct xfs_inode *ip, + struct xfs_btree_cur *cur, + struct xfs_bmbt_irec *irec) { if (info->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -237,16 +237,16 @@ xchk_bmap_rt_extent_xref( /* Cross-reference a single datadev extent record. */ STATIC void xchk_bmap_extent_xref( - struct xchk_bmap_info *info, - struct xfs_inode *ip, - struct xfs_btree_cur *cur, - struct xfs_bmbt_irec *irec) + struct xchk_bmap_info *info, + struct xfs_inode *ip, + struct xfs_btree_cur *cur, + struct xfs_bmbt_irec *irec) { - struct xfs_mount *mp = info->sc->mp; - xfs_agnumber_t agno; - xfs_agblock_t agbno; - xfs_extlen_t len; - int error; + struct xfs_mount *mp = info->sc->mp; + xfs_agnumber_t agno; + xfs_agblock_t agbno; + xfs_extlen_t len; + int error; if (info->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) return; @@ -284,15 +284,15 @@ xchk_bmap_extent_xref( /* Scrub a single extent record. */ STATIC int xchk_bmap_extent( - struct xfs_inode *ip, - struct xfs_btree_cur *cur, - struct xchk_bmap_info *info, - struct xfs_bmbt_irec *irec) + struct xfs_inode *ip, + struct xfs_btree_cur *cur, + struct xchk_bmap_info *info, + struct xfs_bmbt_irec *irec) { - struct xfs_mount *mp = info->sc->mp; - struct xfs_buf *bp = NULL; - xfs_filblks_t end; - int error = 0; + struct xfs_mount *mp = info->sc->mp; + struct xfs_buf *bp = NULL; + xfs_filblks_t end; + int error = 0; if (cur) xfs_btree_get_block(cur, 0, &bp); @@ -357,16 +357,16 @@ xchk_bmap_extent( /* Scrub a bmbt record. */ STATIC int xchk_bmapbt_rec( - struct xchk_btree *bs, - union xfs_btree_rec *rec) + struct xchk_btree *bs, + union xfs_btree_rec *rec) { - struct xfs_bmbt_irec irec; - struct xchk_bmap_info *info = bs->private; - struct xfs_inode *ip = bs->cur->bc_private.b.ip; - struct xfs_buf *bp = NULL; - struct xfs_btree_block *block; - uint64_t owner; - int i; + struct xfs_bmbt_irec irec; + struct xchk_bmap_info *info = bs->private; + struct xfs_inode *ip = bs->cur->bc_private.b.ip; + struct xfs_buf *bp = NULL; + struct xfs_btree_block *block; + uint64_t owner; + int i; /* * Check the owners of the btree blocks up to the level below @@ -392,14 +392,14 @@ xchk_bmapbt_rec( STATIC int xchk_bmap_btree( struct xfs_scrub *sc, - int whichfork, - struct xchk_bmap_info *info) + int whichfork, + struct xchk_bmap_info *info) { - struct xfs_owner_info oinfo; - struct xfs_mount *mp = sc->mp; - struct xfs_inode *ip = sc->ip; - struct xfs_btree_cur *cur; - int error; + struct xfs_owner_info oinfo; + struct xfs_mount *mp = sc->mp; + struct xfs_inode *ip = sc->ip; + struct xfs_btree_cur *cur; + int error; cur = xfs_bmbt_init_cursor(mp, sc->tp, ip, whichfork); xfs_rmap_ino_bmbt_owner(&oinfo, ip->i_ino, whichfork); @@ -410,8 +410,8 @@ xchk_bmap_btree( struct xchk_bmap_check_rmap_info { struct xfs_scrub *sc; - int whichfork; - struct xfs_iext_cursor icur; + int whichfork; + struct xfs_iext_cursor icur; }; /* Can we find bmaps that fit this rmap? */ @@ -424,7 +424,7 @@ xchk_bmap_check_rmap( struct xfs_bmbt_irec irec; struct xchk_bmap_check_rmap_info *sbcri = priv; struct xfs_ifork *ifp; - struct xfs_scrub *sc = sbcri->sc; + struct xfs_scrub *sc = sbcri->sc; bool have_map; /* Is this even the right fork? */ @@ -488,7 +488,7 @@ out: /* Make sure each rmap has a corresponding bmbt entry. */ STATIC int xchk_bmap_check_ag_rmaps( - struct xfs_scrub *sc, + struct xfs_scrub *sc, int whichfork, xfs_agnumber_t agno) { @@ -523,11 +523,11 @@ out_agf: STATIC int xchk_bmap_check_rmaps( struct xfs_scrub *sc, - int whichfork) + int whichfork) { - loff_t size; - xfs_agnumber_t agno; - int error; + loff_t size; + xfs_agnumber_t agno; + int error; if (!xfs_sb_version_hasrmapbt(&sc->mp->m_sb) || whichfork == XFS_COW_FORK || @@ -580,16 +580,16 @@ xchk_bmap_check_rmaps( STATIC int xchk_bmap( struct xfs_scrub *sc, - int whichfork) + int whichfork) { - struct xfs_bmbt_irec irec; - struct xchk_bmap_info info = { NULL }; - struct xfs_mount *mp = sc->mp; - struct xfs_inode *ip = sc->ip; - struct xfs_ifork *ifp; - xfs_fileoff_t endoff; - struct xfs_iext_cursor icur; - int error = 0; + struct xfs_bmbt_irec irec; + struct xchk_bmap_info info = { NULL }; + struct xfs_mount *mp = sc->mp; + struct xfs_inode *ip = sc->ip; + struct xfs_ifork *ifp; + xfs_fileoff_t endoff; + struct xfs_iext_cursor icur; + int error = 0; ifp = XFS_IFORK_PTR(ip, whichfork); diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c index c4e1dce8c5b3..4ae959f7ad2c 100644 --- a/fs/xfs/scrub/btree.c +++ b/fs/xfs/scrub/btree.c @@ -31,11 +31,11 @@ static bool __xchk_btree_process_error( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level, - int *error, - __u32 errflag, - void *ret_ip) + struct xfs_btree_cur *cur, + int level, + int *error, + __u32 errflag, + void *ret_ip) { if (*error == 0) return true; @@ -66,9 +66,9 @@ __xchk_btree_process_error( bool xchk_btree_process_error( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level, - int *error) + struct xfs_btree_cur *cur, + int level, + int *error) { return __xchk_btree_process_error(sc, cur, level, error, XFS_SCRUB_OFLAG_CORRUPT, __return_address); @@ -77,9 +77,9 @@ xchk_btree_process_error( bool xchk_btree_xref_process_error( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level, - int *error) + struct xfs_btree_cur *cur, + int level, + int *error) { return __xchk_btree_process_error(sc, cur, level, error, XFS_SCRUB_OFLAG_XFAIL, __return_address); @@ -89,10 +89,10 @@ xchk_btree_xref_process_error( static void __xchk_btree_set_corrupt( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level, - __u32 errflag, - void *ret_ip) + struct xfs_btree_cur *cur, + int level, + __u32 errflag, + void *ret_ip) { sc->sm->sm_flags |= errflag; @@ -107,8 +107,8 @@ __xchk_btree_set_corrupt( void xchk_btree_set_corrupt( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level) + struct xfs_btree_cur *cur, + int level) { __xchk_btree_set_corrupt(sc, cur, level, XFS_SCRUB_OFLAG_CORRUPT, __return_address); @@ -117,8 +117,8 @@ xchk_btree_set_corrupt( void xchk_btree_xref_set_corrupt( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - int level) + struct xfs_btree_cur *cur, + int level) { __xchk_btree_set_corrupt(sc, cur, level, XFS_SCRUB_OFLAG_XCORRUPT, __return_address); @@ -225,11 +225,11 @@ xchk_btree_key( */ static bool xchk_btree_ptr_ok( - struct xchk_btree *bs, - int level, - union xfs_btree_ptr *ptr) + struct xchk_btree *bs, + int level, + union xfs_btree_ptr *ptr) { - bool res; + bool res; /* A btree rooted in an inode has no block pointer to the root. */ if ((bs->cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) && @@ -250,18 +250,18 @@ xchk_btree_ptr_ok( /* Check that a btree block's sibling matches what we expect it. */ STATIC int xchk_btree_block_check_sibling( - struct xchk_btree *bs, - int level, - int direction, - union xfs_btree_ptr *sibling) + struct xchk_btree *bs, + int level, + int direction, + union xfs_btree_ptr *sibling) { - struct xfs_btree_cur *cur = bs->cur; - struct xfs_btree_block *pblock; - struct xfs_buf *pbp; - struct xfs_btree_cur *ncur = NULL; - union xfs_btree_ptr *pp; - int success; - int error; + struct xfs_btree_cur *cur = bs->cur; + struct xfs_btree_block *pblock; + struct xfs_buf *pbp; + struct xfs_btree_cur *ncur = NULL; + union xfs_btree_ptr *pp; + int success; + int error; error = xfs_btree_dup_cursor(cur, &ncur); if (!xchk_btree_process_error(bs->sc, cur, level + 1, &error) || @@ -313,14 +313,14 @@ out: /* Check the siblings of a btree block. */ STATIC int xchk_btree_block_check_siblings( - struct xchk_btree *bs, - struct xfs_btree_block *block) + struct xchk_btree *bs, + struct xfs_btree_block *block) { - struct xfs_btree_cur *cur = bs->cur; - union xfs_btree_ptr leftsib; - union xfs_btree_ptr rightsib; - int level; - int error = 0; + struct xfs_btree_cur *cur = bs->cur; + union xfs_btree_ptr leftsib; + union xfs_btree_ptr rightsib; + int level; + int error = 0; xfs_btree_get_sibling(cur, block, &leftsib, XFS_BB_LEFTSIB); xfs_btree_get_sibling(cur, block, &rightsib, XFS_BB_RIGHTSIB); @@ -361,15 +361,15 @@ struct check_owner { */ STATIC int xchk_btree_check_block_owner( - struct xchk_btree *bs, - int level, - xfs_daddr_t daddr) + struct xchk_btree *bs, + int level, + xfs_daddr_t daddr) { - xfs_agnumber_t agno; - xfs_agblock_t agbno; - xfs_btnum_t btnum; - bool init_sa; - int error = 0; + xfs_agnumber_t agno; + xfs_agblock_t agbno; + xfs_btnum_t btnum; + bool init_sa; + int error = 0; if (!bs->cur) return 0; @@ -408,12 +408,12 @@ xchk_btree_check_block_owner( /* Check the owner of a btree block. */ STATIC int xchk_btree_check_owner( - struct xchk_btree *bs, - int level, - struct xfs_buf *bp) + struct xchk_btree *bs, + int level, + struct xfs_buf *bp) { - struct xfs_btree_cur *cur = bs->cur; - struct check_owner *co; + struct xfs_btree_cur *cur = bs->cur; + struct check_owner *co; if ((cur->bc_flags & XFS_BTREE_ROOT_IN_INODE) && bp == NULL) return 0; @@ -484,14 +484,14 @@ xchk_btree_check_minrecs( */ STATIC int xchk_btree_get_block( - struct xchk_btree *bs, - int level, - union xfs_btree_ptr *pp, - struct xfs_btree_block **pblock, - struct xfs_buf **pbp) + struct xchk_btree *bs, + int level, + union xfs_btree_ptr *pp, + struct xfs_btree_block **pblock, + struct xfs_buf **pbp) { - void *failed_at; - int error; + xfs_failaddr_t failed_at; + int error; *pblock = NULL; *pbp = NULL; @@ -538,17 +538,17 @@ xchk_btree_get_block( */ STATIC void xchk_btree_block_keys( - struct xchk_btree *bs, - int level, - struct xfs_btree_block *block) + struct xchk_btree *bs, + int level, + struct xfs_btree_block *block) { - union xfs_btree_key block_keys; - struct xfs_btree_cur *cur = bs->cur; - union xfs_btree_key *high_bk; - union xfs_btree_key *parent_keys; - union xfs_btree_key *high_pk; - struct xfs_btree_block *parent_block; - struct xfs_buf *bp; + union xfs_btree_key block_keys; + struct xfs_btree_cur *cur = bs->cur; + union xfs_btree_key *high_bk; + union xfs_btree_key *parent_keys; + union xfs_btree_key *high_pk; + struct xfs_btree_block *parent_block; + struct xfs_buf *bp; if (level >= cur->bc_nlevels - 1) return; @@ -584,22 +584,22 @@ xchk_btree_block_keys( int xchk_btree( struct xfs_scrub *sc, - struct xfs_btree_cur *cur, - xchk_btree_rec_fn scrub_fn, - struct xfs_owner_info *oinfo, - void *private) + struct xfs_btree_cur *cur, + xchk_btree_rec_fn scrub_fn, + struct xfs_owner_info *oinfo, + void *private) { - struct xchk_btree bs = { NULL }; - union xfs_btree_ptr ptr; - union xfs_btree_ptr *pp; - union xfs_btree_rec *recp; - struct xfs_btree_block *block; - int level; - struct xfs_buf *bp; - struct check_owner *co; - struct check_owner *n; - int i; - int error = 0; + struct xchk_btree bs = { NULL }; + union xfs_btree_ptr ptr; + union xfs_btree_ptr *pp; + union xfs_btree_rec *recp; + struct xfs_btree_block *block; + int level; + struct xfs_buf *bp; + struct check_owner *co; + struct check_owner *n; + int i; + int error = 0; /* Initialize scrub state */ bs.cur = cur; diff --git a/fs/xfs/scrub/btree.h b/fs/xfs |