Skip to content

Commit

Permalink
xfs: fix indentation and other whitespace problems in scrub/repair
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darrick J. Wong committed Jul 23, 2018
1 parent 1d8a748 commit 032d91f
Show file tree
Hide file tree
Showing 25 changed files with 832 additions and 843 deletions.
172 changes: 86 additions & 86 deletions fs/xfs/scrub/agheader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -598,19 +598,19 @@ xchk_agf(
/* 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;
};

/* Cross-reference with the other btrees. */
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;
Expand All @@ -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)
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions fs/xfs/scrub/agheader_repair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
48 changes: 24 additions & 24 deletions fs/xfs/scrub/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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);
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 032d91f

Please sign in to comment.