Skip to content

Commit 032d91f

Browse files
committed
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>
1 parent 1d8a748 commit 032d91f

25 files changed

Lines changed: 832 additions & 843 deletions

‎fs/xfs/scrub/agheader.c‎

Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@
3030
STATIC void
3131
xchk_superblock_xref(
3232
struct xfs_scrub *sc,
33-
struct xfs_buf *bp)
33+
struct xfs_buf *bp)
3434
{
35-
struct xfs_owner_info oinfo;
36-
struct xfs_mount *mp = sc->mp;
37-
xfs_agnumber_t agno = sc->sm->sm_agno;
38-
xfs_agblock_t agbno;
39-
int error;
35+
struct xfs_owner_info oinfo;
36+
struct xfs_mount *mp = sc->mp;
37+
xfs_agnumber_t agno = sc->sm->sm_agno;
38+
xfs_agblock_t agbno;
39+
int error;
4040

4141
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
4242
return;
@@ -68,14 +68,14 @@ int
6868
xchk_superblock(
6969
struct xfs_scrub *sc)
7070
{
71-
struct xfs_mount *mp = sc->mp;
72-
struct xfs_buf *bp;
73-
struct xfs_dsb *sb;
74-
xfs_agnumber_t agno;
75-
uint32_t v2_ok;
76-
__be32 features_mask;
77-
int error;
78-
__be16 vernum_mask;
71+
struct xfs_mount *mp = sc->mp;
72+
struct xfs_buf *bp;
73+
struct xfs_dsb *sb;
74+
xfs_agnumber_t agno;
75+
uint32_t v2_ok;
76+
__be32 features_mask;
77+
int error;
78+
__be16 vernum_mask;
7979

8080
agno = sc->sm->sm_agno;
8181
if (agno == 0)
@@ -367,9 +367,9 @@ static inline void
367367
xchk_agf_xref_freeblks(
368368
struct xfs_scrub *sc)
369369
{
370-
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
371-
xfs_extlen_t blocks = 0;
372-
int error;
370+
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
371+
xfs_extlen_t blocks = 0;
372+
int error;
373373

374374
if (!sc->sa.bno_cur)
375375
return;
@@ -387,11 +387,11 @@ static inline void
387387
xchk_agf_xref_cntbt(
388388
struct xfs_scrub *sc)
389389
{
390-
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
391-
xfs_agblock_t agbno;
392-
xfs_extlen_t blocks;
393-
int have;
394-
int error;
390+
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
391+
xfs_agblock_t agbno;
392+
xfs_extlen_t blocks;
393+
int have;
394+
int error;
395395

396396
if (!sc->sa.cnt_cur)
397397
return;
@@ -419,11 +419,11 @@ STATIC void
419419
xchk_agf_xref_btreeblks(
420420
struct xfs_scrub *sc)
421421
{
422-
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
423-
struct xfs_mount *mp = sc->mp;
424-
xfs_agblock_t blocks;
425-
xfs_agblock_t btreeblks;
426-
int error;
422+
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
423+
struct xfs_mount *mp = sc->mp;
424+
xfs_agblock_t blocks;
425+
xfs_agblock_t btreeblks;
426+
int error;
427427

428428
/* Check agf_rmap_blocks; set up for agf_btreeblks check */
429429
if (sc->sa.rmap_cur) {
@@ -465,9 +465,9 @@ static inline void
465465
xchk_agf_xref_refcblks(
466466
struct xfs_scrub *sc)
467467
{
468-
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
469-
xfs_agblock_t blocks;
470-
int error;
468+
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
469+
xfs_agblock_t blocks;
470+
int error;
471471

472472
if (!sc->sa.refc_cur)
473473
return;
@@ -484,10 +484,10 @@ STATIC void
484484
xchk_agf_xref(
485485
struct xfs_scrub *sc)
486486
{
487-
struct xfs_owner_info oinfo;
488-
struct xfs_mount *mp = sc->mp;
489-
xfs_agblock_t agbno;
490-
int error;
487+
struct xfs_owner_info oinfo;
488+
struct xfs_mount *mp = sc->mp;
489+
xfs_agblock_t agbno;
490+
int error;
491491

492492
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
493493
return;
@@ -516,17 +516,17 @@ int
516516
xchk_agf(
517517
struct xfs_scrub *sc)
518518
{
519-
struct xfs_mount *mp = sc->mp;
520-
struct xfs_agf *agf;
521-
xfs_agnumber_t agno;
522-
xfs_agblock_t agbno;
523-
xfs_agblock_t eoag;
524-
xfs_agblock_t agfl_first;
525-
xfs_agblock_t agfl_last;
526-
xfs_agblock_t agfl_count;
527-
xfs_agblock_t fl_count;
528-
int level;
529-
int error = 0;
519+
struct xfs_mount *mp = sc->mp;
520+
struct xfs_agf *agf;
521+
xfs_agnumber_t agno;
522+
xfs_agblock_t agbno;
523+
xfs_agblock_t eoag;
524+
xfs_agblock_t agfl_first;
525+
xfs_agblock_t agfl_last;
526+
xfs_agblock_t agfl_count;
527+
xfs_agblock_t fl_count;
528+
int level;
529+
int error = 0;
530530

531531
agno = sc->sa.agno = sc->sm->sm_agno;
532532
error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp,
@@ -598,19 +598,19 @@ xchk_agf(
598598
/* AGFL */
599599

600600
struct xchk_agfl_info {
601-
struct xfs_owner_info oinfo;
602-
unsigned int sz_entries;
603-
unsigned int nr_entries;
604-
xfs_agblock_t *entries;
601+
struct xfs_owner_info oinfo;
602+
unsigned int sz_entries;
603+
unsigned int nr_entries;
604+
xfs_agblock_t *entries;
605605
struct xfs_scrub *sc;
606606
};
607607

608608
/* Cross-reference with the other btrees. */
609609
STATIC void
610610
xchk_agfl_block_xref(
611611
struct xfs_scrub *sc,
612-
xfs_agblock_t agbno,
613-
struct xfs_owner_info *oinfo)
612+
xfs_agblock_t agbno,
613+
struct xfs_owner_info *oinfo)
614614
{
615615
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
616616
return;
@@ -624,13 +624,13 @@ xchk_agfl_block_xref(
624624
/* Scrub an AGFL block. */
625625
STATIC int
626626
xchk_agfl_block(
627-
struct xfs_mount *mp,
628-
xfs_agblock_t agbno,
629-
void *priv)
627+
struct xfs_mount *mp,
628+
xfs_agblock_t agbno,
629+
void *priv)
630630
{
631-
struct xchk_agfl_info *sai = priv;
631+
struct xchk_agfl_info *sai = priv;
632632
struct xfs_scrub *sc = sai->sc;
633-
xfs_agnumber_t agno = sc->sa.agno;
633+
xfs_agnumber_t agno = sc->sa.agno;
634634

635635
if (xfs_verify_agbno(mp, agno, agbno) &&
636636
sai->nr_entries < sai->sz_entries)
@@ -662,10 +662,10 @@ STATIC void
662662
xchk_agfl_xref(
663663
struct xfs_scrub *sc)
664664
{
665-
struct xfs_owner_info oinfo;
666-
struct xfs_mount *mp = sc->mp;
667-
xfs_agblock_t agbno;
668-
int error;
665+
struct xfs_owner_info oinfo;
666+
struct xfs_mount *mp = sc->mp;
667+
xfs_agblock_t agbno;
668+
int error;
669669

670670
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
671671
return;
@@ -693,12 +693,12 @@ int
693693
xchk_agfl(
694694
struct xfs_scrub *sc)
695695
{
696-
struct xchk_agfl_info sai;
697-
struct xfs_agf *agf;
698-
xfs_agnumber_t agno;
699-
unsigned int agflcount;
700-
unsigned int i;
701-
int error;
696+
struct xchk_agfl_info sai;
697+
struct xfs_agf *agf;
698+
xfs_agnumber_t agno;
699+
unsigned int agflcount;
700+
unsigned int i;
701+
int error;
702702

703703
agno = sc->sa.agno = sc->sm->sm_agno;
704704
error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp,
@@ -770,10 +770,10 @@ static inline void
770770
xchk_agi_xref_icounts(
771771
struct xfs_scrub *sc)
772772
{
773-
struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp);
774-
xfs_agino_t icount;
775-
xfs_agino_t freecount;
776-
int error;
773+
struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp);
774+
xfs_agino_t icount;
775+
xfs_agino_t freecount;
776+
int error;
777777

778778
if (!sc->sa.ino_cur)
779779
return;
@@ -791,10 +791,10 @@ STATIC void
791791
xchk_agi_xref(
792792
struct xfs_scrub *sc)
793793
{
794-
struct xfs_owner_info oinfo;
795-
struct xfs_mount *mp = sc->mp;
796-
xfs_agblock_t agbno;
797-
int error;
794+
struct xfs_owner_info oinfo;
795+
struct xfs_mount *mp = sc->mp;
796+
xfs_agblock_t agbno;
797+
int error;
798798

799799
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
800800
return;
@@ -820,18 +820,18 @@ int
820820
xchk_agi(
821821
struct xfs_scrub *sc)
822822
{
823-
struct xfs_mount *mp = sc->mp;
824-
struct xfs_agi *agi;
825-
xfs_agnumber_t agno;
826-
xfs_agblock_t agbno;
827-
xfs_agblock_t eoag;
828-
xfs_agino_t agino;
829-
xfs_agino_t first_agino;
830-
xfs_agino_t last_agino;
831-
xfs_agino_t icount;
832-
int i;
833-
int level;
834-
int error = 0;
823+
struct xfs_mount *mp = sc->mp;
824+
struct xfs_agi *agi;
825+
xfs_agnumber_t agno;
826+
xfs_agblock_t agbno;
827+
xfs_agblock_t eoag;
828+
xfs_agino_t agino;
829+
xfs_agino_t first_agino;
830+
xfs_agino_t last_agino;
831+
xfs_agino_t icount;
832+
int i;
833+
int level;
834+
int error = 0;
835835

836836
agno = sc->sa.agno = sc->sm->sm_agno;
837837
error = xchk_ag_read_headers(sc, agno, &sc->sa.agi_bp,

‎fs/xfs/scrub/agheader_repair.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ int
3131
xrep_superblock(
3232
struct xfs_scrub *sc)
3333
{
34-
struct xfs_mount *mp = sc->mp;
35-
struct xfs_buf *bp;
36-
xfs_agnumber_t agno;
37-
int error;
34+
struct xfs_mount *mp = sc->mp;
35+
struct xfs_buf *bp;
36+
xfs_agnumber_t agno;
37+
int error;
3838

3939
/* Don't try to repair AG 0's sb; let xfs_repair deal with it. */
4040
agno = sc->sm->sm_agno;

‎fs/xfs/scrub/alloc.c‎

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
int
3131
xchk_setup_ag_allocbt(
3232
struct xfs_scrub *sc,
33-
struct xfs_inode *ip)
33+
struct xfs_inode *ip)
3434
{
3535
return xchk_setup_ag_btree(sc, ip, false);
3636
}
@@ -43,14 +43,14 @@ xchk_setup_ag_allocbt(
4343
STATIC void
4444
xchk_allocbt_xref_other(
4545
struct xfs_scrub *sc,
46-
xfs_agblock_t agbno,
47-
xfs_extlen_t len)
46+
xfs_agblock_t agbno,
47+
xfs_extlen_t len)
4848
{
49-
struct xfs_btree_cur **pcur;
50-
xfs_agblock_t fbno;
51-
xfs_extlen_t flen;
52-
int has_otherrec;
53-
int error;
49+
struct xfs_btree_cur **pcur;
50+
xfs_agblock_t fbno;
51+
xfs_extlen_t flen;
52+
int has_otherrec;
53+
int error;
5454

5555
if (sc->sm->sm_type == XFS_SCRUB_TYPE_BNOBT)
5656
pcur = &sc->sa.cnt_cur;
@@ -83,8 +83,8 @@ xchk_allocbt_xref_other(
8383
STATIC void
8484
xchk_allocbt_xref(
8585
struct xfs_scrub *sc,
86-
xfs_agblock_t agbno,
87-
xfs_extlen_t len)
86+
xfs_agblock_t agbno,
87+
xfs_extlen_t len)
8888
{
8989
if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)
9090
return;
@@ -98,14 +98,14 @@ xchk_allocbt_xref(
9898
/* Scrub a bnobt/cntbt record. */
9999
STATIC int
100100
xchk_allocbt_rec(
101-
struct xchk_btree *bs,
102-
union xfs_btree_rec *rec)
101+
struct xchk_btree *bs,
102+
union xfs_btree_rec *rec)
103103
{
104-
struct xfs_mount *mp = bs->cur->bc_mp;
105-
xfs_agnumber_t agno = bs->cur->bc_private.a.agno;
106-
xfs_agblock_t bno;
107-
xfs_extlen_t len;
108-
int error = 0;
104+
struct xfs_mount *mp = bs->cur->bc_mp;
105+
xfs_agnumber_t agno = bs->cur->bc_private.a.agno;
106+
xfs_agblock_t bno;
107+
xfs_extlen_t len;
108+
int error = 0;
109109

110110
bno = be32_to_cpu(rec->alloc.ar_startblock);
111111
len = be32_to_cpu(rec->alloc.ar_blockcount);
@@ -124,10 +124,10 @@ xchk_allocbt_rec(
124124
STATIC int
125125
xchk_allocbt(
126126
struct xfs_scrub *sc,
127-
xfs_btnum_t which)
127+
xfs_btnum_t which)
128128
{
129-
struct xfs_owner_info oinfo;
130-
struct xfs_btree_cur *cur;
129+
struct xfs_owner_info oinfo;
130+
struct xfs_btree_cur *cur;
131131

132132
xfs_rmap_ag_owner(&oinfo, XFS_RMAP_OWN_AG);
133133
cur = which == XFS_BTNUM_BNO ? sc->sa.bno_cur : sc->sa.cnt_cur;
@@ -152,11 +152,11 @@ xchk_cntbt(
152152
void
153153
xchk_xref_is_used_space(
154154
struct xfs_scrub *sc,
155-
xfs_agblock_t agbno,
156-
xfs_extlen_t len)
155+
xfs_agblock_t agbno,
156+
xfs_extlen_t len)
157157
{
158-
bool is_freesp;
159-
int error;
158+
bool is_freesp;
159+
int error;
160160

161161
if (!sc->sa.bno_cur || xchk_skip_xref(sc->sm))
162162
return;

0 commit comments

Comments
 (0)