diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-19 15:29:12 -0400 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-07-23 12:08:00 -0400 |
commit | 1d8a748a8aa94a7da8f3d4fac1892037890d3cff (patch) | |
tree | f8698e3a17ccf281ad14eb47b8bef8cbfa751c97 | |
parent | b5e2196e9c7217387bab2ab4231ad9f4585f55c5 (diff) |
xfs: shorten struct xfs_scrub_context to struct xfs_scrub
Shorten the name of the online fsck context structure. Whitespace
damage will be fixed by a subsequent patch. 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 | 32 | ||||
-rw-r--r-- | fs/xfs/scrub/agheader_repair.c | 2 | ||||
-rw-r--r-- | fs/xfs/scrub/alloc.c | 14 | ||||
-rw-r--r-- | fs/xfs/scrub/attr.c | 10 | ||||
-rw-r--r-- | fs/xfs/scrub/bmap.c | 22 | ||||
-rw-r--r-- | fs/xfs/scrub/btree.c | 14 | ||||
-rw-r--r-- | fs/xfs/scrub/btree.h | 12 | ||||
-rw-r--r-- | fs/xfs/scrub/common.c | 62 | ||||
-rw-r--r-- | fs/xfs/scrub/common.h | 88 | ||||
-rw-r--r-- | fs/xfs/scrub/dabtree.c | 6 | ||||
-rw-r--r-- | fs/xfs/scrub/dabtree.h | 4 | ||||
-rw-r--r-- | fs/xfs/scrub/dir.c | 18 | ||||
-rw-r--r-- | fs/xfs/scrub/ialloc.c | 22 | ||||
-rw-r--r-- | fs/xfs/scrub/inode.c | 22 | ||||
-rw-r--r-- | fs/xfs/scrub/parent.c | 8 | ||||
-rw-r--r-- | fs/xfs/scrub/quota.c | 12 | ||||
-rw-r--r-- | fs/xfs/scrub/refcount.c | 16 | ||||
-rw-r--r-- | fs/xfs/scrub/repair.c | 36 | ||||
-rw-r--r-- | fs/xfs/scrub/repair.h | 38 | ||||
-rw-r--r-- | fs/xfs/scrub/rmap.c | 16 | ||||
-rw-r--r-- | fs/xfs/scrub/rtbitmap.c | 10 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.c | 10 | ||||
-rw-r--r-- | fs/xfs/scrub/scrub.h | 78 | ||||
-rw-r--r-- | fs/xfs/scrub/symlink.c | 4 | ||||
-rw-r--r-- | fs/xfs/scrub/trace.h | 32 |
25 files changed, 294 insertions, 294 deletions
diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c index c0625ec16d63..14ba4189ae8f 100644 --- a/fs/xfs/scrub/agheader.c +++ b/fs/xfs/scrub/agheader.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /* Cross-reference with the other btrees. */ | 29 | /* Cross-reference with the other btrees. */ |
30 | STATIC void | 30 | STATIC void |
31 | xchk_superblock_xref( | 31 | xchk_superblock_xref( |
32 | struct xfs_scrub_context *sc, | 32 | struct xfs_scrub *sc, |
33 | struct xfs_buf *bp) | 33 | struct xfs_buf *bp) |
34 | { | 34 | { |
35 | struct xfs_owner_info oinfo; | 35 | struct xfs_owner_info oinfo; |
@@ -66,7 +66,7 @@ xchk_superblock_xref( | |||
66 | */ | 66 | */ |
67 | int | 67 | int |
68 | xchk_superblock( | 68 | xchk_superblock( |
69 | struct xfs_scrub_context *sc) | 69 | struct xfs_scrub *sc) |
70 | { | 70 | { |
71 | struct xfs_mount *mp = sc->mp; | 71 | struct xfs_mount *mp = sc->mp; |
72 | struct xfs_buf *bp; | 72 | struct xfs_buf *bp; |
@@ -365,7 +365,7 @@ xchk_agf_record_bno_lengths( | |||
365 | /* Check agf_freeblks */ | 365 | /* Check agf_freeblks */ |
366 | static inline void | 366 | static inline void |
367 | xchk_agf_xref_freeblks( | 367 | xchk_agf_xref_freeblks( |
368 | struct xfs_scrub_context *sc) | 368 | struct xfs_scrub *sc) |
369 | { | 369 | { |
370 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); | 370 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); |
371 | xfs_extlen_t blocks = 0; | 371 | xfs_extlen_t blocks = 0; |
@@ -385,7 +385,7 @@ xchk_agf_xref_freeblks( | |||
385 | /* Cross reference the AGF with the cntbt (freespace by length btree) */ | 385 | /* Cross reference the AGF with the cntbt (freespace by length btree) */ |
386 | static inline void | 386 | static inline void |
387 | xchk_agf_xref_cntbt( | 387 | xchk_agf_xref_cntbt( |
388 | struct xfs_scrub_context *sc) | 388 | struct xfs_scrub *sc) |
389 | { | 389 | { |
390 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); | 390 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); |
391 | xfs_agblock_t agbno; | 391 | xfs_agblock_t agbno; |
@@ -417,7 +417,7 @@ xchk_agf_xref_cntbt( | |||
417 | /* Check the btree block counts in the AGF against the btrees. */ | 417 | /* Check the btree block counts in the AGF against the btrees. */ |
418 | STATIC void | 418 | STATIC void |
419 | xchk_agf_xref_btreeblks( | 419 | xchk_agf_xref_btreeblks( |
420 | struct xfs_scrub_context *sc) | 420 | struct xfs_scrub *sc) |
421 | { | 421 | { |
422 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); | 422 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); |
423 | struct xfs_mount *mp = sc->mp; | 423 | struct xfs_mount *mp = sc->mp; |
@@ -463,7 +463,7 @@ xchk_agf_xref_btreeblks( | |||
463 | /* Check agf_refcount_blocks against tree size */ | 463 | /* Check agf_refcount_blocks against tree size */ |
464 | static inline void | 464 | static inline void |
465 | xchk_agf_xref_refcblks( | 465 | xchk_agf_xref_refcblks( |
466 | struct xfs_scrub_context *sc) | 466 | struct xfs_scrub *sc) |
467 | { | 467 | { |
468 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); | 468 | struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); |
469 | xfs_agblock_t blocks; | 469 | xfs_agblock_t blocks; |
@@ -482,7 +482,7 @@ xchk_agf_xref_refcblks( | |||
482 | /* Cross-reference with the other btrees. */ | 482 | /* Cross-reference with the other btrees. */ |
483 | STATIC void | 483 | STATIC void |
484 | xchk_agf_xref( | 484 | xchk_agf_xref( |
485 | struct xfs_scrub_context *sc) | 485 | struct xfs_scrub *sc) |
486 | { | 486 | { |
487 | struct xfs_owner_info oinfo; | 487 | struct xfs_owner_info oinfo; |
488 | struct xfs_mount *mp = sc->mp; | 488 | struct xfs_mount *mp = sc->mp; |
@@ -514,7 +514,7 @@ xchk_agf_xref( | |||
514 | /* Scrub the AGF. */ | 514 | /* Scrub the AGF. */ |
515 | int | 515 | int |
516 | xchk_agf( | 516 | xchk_agf( |
517 | struct xfs_scrub_context *sc) | 517 | struct xfs_scrub *sc) |
518 | { | 518 | { |
519 | struct xfs_mount *mp = sc->mp; | 519 | struct xfs_mount *mp = sc->mp; |
520 | struct xfs_agf *agf; | 520 | struct xfs_agf *agf; |
@@ -602,13 +602,13 @@ struct xchk_agfl_info { | |||
602 | unsigned int sz_entries; | 602 | unsigned int sz_entries; |
603 | unsigned int nr_entries; | 603 | unsigned int nr_entries; |
604 | xfs_agblock_t *entries; | 604 | xfs_agblock_t *entries; |
605 | struct xfs_scrub_context *sc; | 605 | struct xfs_scrub *sc; |
606 | }; | 606 | }; |
607 | 607 | ||
608 | /* Cross-reference with the other btrees. */ | 608 | /* Cross-reference with the other btrees. */ |
609 | STATIC void | 609 | STATIC void |
610 | xchk_agfl_block_xref( | 610 | xchk_agfl_block_xref( |
611 | struct xfs_scrub_context *sc, | 611 | struct xfs_scrub *sc, |
612 | xfs_agblock_t agbno, | 612 | xfs_agblock_t agbno, |
613 | struct xfs_owner_info *oinfo) | 613 | struct xfs_owner_info *oinfo) |
614 | { | 614 | { |
@@ -629,7 +629,7 @@ xchk_agfl_block( | |||
629 | void *priv) | 629 | void *priv) |
630 | { | 630 | { |
631 | struct xchk_agfl_info *sai = priv; | 631 | struct xchk_agfl_info *sai = priv; |
632 | struct xfs_scrub_context *sc = sai->sc; | 632 | struct xfs_scrub *sc = sai->sc; |
633 | xfs_agnumber_t agno = sc->sa.agno; | 633 | xfs_agnumber_t agno = sc->sa.agno; |
634 | 634 | ||
635 | if (xfs_verify_agbno(mp, agno, agbno) && | 635 | if (xfs_verify_agbno(mp, agno, agbno) && |
@@ -660,7 +660,7 @@ xchk_agblock_cmp( | |||
660 | /* Cross-reference with the other btrees. */ | 660 | /* Cross-reference with the other btrees. */ |
661 | STATIC void | 661 | STATIC void |
662 | xchk_agfl_xref( | 662 | xchk_agfl_xref( |
663 | struct xfs_scrub_context *sc) | 663 | struct xfs_scrub *sc) |
664 | { | 664 | { |
665 | struct xfs_owner_info oinfo; | 665 | struct xfs_owner_info oinfo; |
666 | struct xfs_mount *mp = sc->mp; | 666 | struct xfs_mount *mp = sc->mp; |
@@ -691,7 +691,7 @@ xchk_agfl_xref( | |||
691 | /* Scrub the AGFL. */ | 691 | /* Scrub the AGFL. */ |
692 | int | 692 | int |
693 | xchk_agfl( | 693 | xchk_agfl( |
694 | struct xfs_scrub_context *sc) | 694 | struct xfs_scrub *sc) |
695 | { | 695 | { |
696 | struct xchk_agfl_info sai; | 696 | struct xchk_agfl_info sai; |
697 | struct xfs_agf *agf; | 697 | struct xfs_agf *agf; |
@@ -768,7 +768,7 @@ out: | |||
768 | /* Check agi_count/agi_freecount */ | 768 | /* Check agi_count/agi_freecount */ |
769 | static inline void | 769 | static inline void |
770 | xchk_agi_xref_icounts( | 770 | xchk_agi_xref_icounts( |
771 | struct xfs_scrub_context *sc) | 771 | struct xfs_scrub *sc) |
772 | { | 772 | { |
773 | struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); | 773 | struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); |
774 | xfs_agino_t icount; | 774 | xfs_agino_t icount; |
@@ -789,7 +789,7 @@ xchk_agi_xref_icounts( | |||
789 | /* Cross-reference with the other btrees. */ | 789 | /* Cross-reference with the other btrees. */ |
790 | STATIC void | 790 | STATIC void |
791 | xchk_agi_xref( | 791 | xchk_agi_xref( |
792 | struct xfs_scrub_context *sc) | 792 | struct xfs_scrub *sc) |
793 | { | 793 | { |
794 | struct xfs_owner_info oinfo; | 794 | struct xfs_owner_info oinfo; |
795 | struct xfs_mount *mp = sc->mp; | 795 | struct xfs_mount *mp = sc->mp; |
@@ -818,7 +818,7 @@ xchk_agi_xref( | |||
818 | /* Scrub the AGI. */ | 818 | /* Scrub the AGI. */ |
819 | int | 819 | int |
820 | xchk_agi( | 820 | xchk_agi( |
821 | struct xfs_scrub_context *sc) | 821 | struct xfs_scrub *sc) |
822 | { | 822 | { |
823 | struct xfs_mount *mp = sc->mp; | 823 | struct xfs_mount *mp = sc->mp; |
824 | struct xfs_agi *agi; | 824 | struct xfs_agi *agi; |
diff --git a/fs/xfs/scrub/agheader_repair.c b/fs/xfs/scrub/agheader_repair.c index 631940f3ca4d..2457968482f8 100644 --- a/fs/xfs/scrub/agheader_repair.c +++ b/fs/xfs/scrub/agheader_repair.c | |||
@@ -29,7 +29,7 @@ | |||
29 | /* Repair the superblock. */ | 29 | /* Repair the superblock. */ |
30 | int | 30 | int |
31 | xrep_superblock( | 31 | xrep_superblock( |
32 | struct xfs_scrub_context *sc) | 32 | struct xfs_scrub *sc) |
33 | { | 33 | { |
34 | struct xfs_mount *mp = sc->mp; | 34 | struct xfs_mount *mp = sc->mp; |
35 | struct xfs_buf *bp; | 35 | struct xfs_buf *bp; |
diff --git a/fs/xfs/scrub/alloc.c b/fs/xfs/scrub/alloc.c index 1f6e3a6a1fdd..653d80b3aa39 100644 --- a/fs/xfs/scrub/alloc.c +++ b/fs/xfs/scrub/alloc.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | int | 30 | int |
31 | xchk_setup_ag_allocbt( | 31 | xchk_setup_ag_allocbt( |
32 | struct xfs_scrub_context *sc, | 32 | struct xfs_scrub *sc, |
33 | struct xfs_inode *ip) | 33 | struct xfs_inode *ip) |
34 | { | 34 | { |
35 | return xchk_setup_ag_btree(sc, ip, false); | 35 | return xchk_setup_ag_btree(sc, ip, false); |
@@ -42,7 +42,7 @@ xchk_setup_ag_allocbt( | |||
42 | */ | 42 | */ |
43 | STATIC void | 43 | STATIC void |
44 | xchk_allocbt_xref_other( | 44 | xchk_allocbt_xref_other( |
45 | struct xfs_scrub_context *sc, | 45 | struct xfs_scrub *sc, |
46 | xfs_agblock_t agbno, | 46 | xfs_agblock_t agbno, |
47 | xfs_extlen_t len) | 47 | xfs_extlen_t len) |
48 | { | 48 | { |
@@ -82,7 +82,7 @@ xchk_allocbt_xref_other( | |||
82 | /* Cross-reference with the other btrees. */ | 82 | /* Cross-reference with the other btrees. */ |
83 | STATIC void | 83 | STATIC void |
84 | xchk_allocbt_xref( | 84 | xchk_allocbt_xref( |
85 | struct xfs_scrub_context *sc, | 85 | struct xfs_scrub *sc, |
86 | xfs_agblock_t agbno, | 86 | xfs_agblock_t agbno, |
87 | xfs_extlen_t len) | 87 | xfs_extlen_t len) |
88 | { | 88 | { |
@@ -123,7 +123,7 @@ xchk_allocbt_rec( | |||
123 | /* Scrub the freespace btrees for some AG. */ | 123 | /* Scrub the freespace btrees for some AG. */ |
124 | STATIC int | 124 | STATIC int |
125 | xchk_allocbt( | 125 | xchk_allocbt( |
126 | struct xfs_scrub_context *sc, | 126 | struct xfs_scrub *sc, |
127 | xfs_btnum_t which) | 127 | xfs_btnum_t which) |
128 | { | 128 | { |
129 | struct xfs_owner_info oinfo; | 129 | struct xfs_owner_info oinfo; |
@@ -136,14 +136,14 @@ xchk_allocbt( | |||
136 | 136 | ||
137 | int | 137 | int |
138 | xchk_bnobt( | 138 | xchk_bnobt( |
139 | struct xfs_scrub_context *sc) | 139 | struct xfs_scrub *sc) |
140 | { | 140 | { |
141 | return xchk_allocbt(sc, XFS_BTNUM_BNO); | 141 | return xchk_allocbt(sc, XFS_BTNUM_BNO); |
142 | } | 142 | } |
143 | 143 | ||
144 | int | 144 | int |
145 | xchk_cntbt( | 145 | xchk_cntbt( |
146 | struct xfs_scrub_context *sc) | 146 | struct xfs_scrub *sc) |
147 | { | 147 | { |
148 | return xchk_allocbt(sc, XFS_BTNUM_CNT); | 148 | return xchk_allocbt(sc, XFS_BTNUM_CNT); |
149 | } | 149 | } |
@@ -151,7 +151,7 @@ xchk_cntbt( | |||
151 | /* xref check that the extent is not free */ | 151 | /* xref check that the extent is not free */ |
152 | void | 152 | void |
153 | xchk_xref_is_used_space( | 153 | xchk_xref_is_used_space( |
154 | struct xfs_scrub_context *sc, | 154 | struct xfs_scrub *sc, |
155 | xfs_agblock_t agbno, | 155 | xfs_agblock_t agbno, |
156 | xfs_extlen_t len) | 156 | xfs_extlen_t len) |
157 | { | 157 | { |
diff --git a/fs/xfs/scrub/attr.c b/fs/xfs/scrub/attr.c index 0068bebddf3e..6650fb3010b6 100644 --- a/fs/xfs/scrub/attr.c +++ b/fs/xfs/scrub/attr.c | |||
@@ -33,7 +33,7 @@ | |||
33 | /* Set us up to scrub an inode's extended attributes. */ | 33 | /* Set us up to scrub an inode's extended attributes. */ |
34 | int | 34 | int |
35 | xchk_setup_xattr( | 35 | xchk_setup_xattr( |
36 | struct xfs_scrub_context *sc, | 36 | struct xfs_scrub *sc, |
37 | struct xfs_inode *ip) | 37 | struct xfs_inode *ip) |
38 | { | 38 | { |
39 | size_t sz; | 39 | size_t sz; |
@@ -57,7 +57,7 @@ xchk_setup_xattr( | |||
57 | 57 | ||
58 | struct xchk_xattr { | 58 | struct xchk_xattr { |
59 | struct xfs_attr_list_context context; | 59 | struct xfs_attr_list_context context; |
60 | struct xfs_scrub_context *sc; | 60 | struct xfs_scrub *sc; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | /* | 63 | /* |
@@ -127,7 +127,7 @@ fail_xref: | |||
127 | */ | 127 | */ |
128 | STATIC bool | 128 | STATIC bool |
129 | xchk_xattr_set_map( | 129 | xchk_xattr_set_map( |
130 | struct xfs_scrub_context *sc, | 130 | struct xfs_scrub *sc, |
131 | unsigned long *map, | 131 | unsigned long *map, |
132 | unsigned int start, | 132 | unsigned int start, |
133 | unsigned int len) | 133 | unsigned int len) |
@@ -155,7 +155,7 @@ xchk_xattr_set_map( | |||
155 | */ | 155 | */ |
156 | STATIC bool | 156 | STATIC bool |
157 | xchk_xattr_check_freemap( | 157 | xchk_xattr_check_freemap( |
158 | struct xfs_scrub_context *sc, | 158 | struct xfs_scrub *sc, |
159 | unsigned long *map, | 159 | unsigned long *map, |
160 | struct xfs_attr3_icleaf_hdr *leafhdr) | 160 | struct xfs_attr3_icleaf_hdr *leafhdr) |
161 | { | 161 | { |
@@ -405,7 +405,7 @@ out: | |||
405 | /* Scrub the extended attribute metadata. */ | 405 | /* Scrub the extended attribute metadata. */ |
406 | int | 406 | int |
407 | xchk_xattr( | 407 | xchk_xattr( |
408 | struct xfs_scrub_context *sc) | 408 | struct xfs_scrub *sc) |
409 | { | 409 | { |
410 | struct xchk_xattr sx; | 410 | struct xchk_xattr sx; |
411 | struct attrlist_cursor_kern cursor = { 0 }; | 411 | struct attrlist_cursor_kern cursor = { 0 }; |
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 19cfbd3910a2..0e5166232b15 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c | |||
@@ -34,7 +34,7 @@ | |||
34 | /* Set us up with an inode's bmap. */ | 34 | /* Set us up with an inode's bmap. */ |
35 | int | 35 | int |
36 | xchk_setup_inode_bmap( | 36 | xchk_setup_inode_bmap( |
37 | struct xfs_scrub_context *sc, | 37 | struct xfs_scrub *sc, |
38 | struct xfs_inode *ip) | 38 | struct xfs_inode *ip) |
39 | { | 39 | { |
40 | int error; | 40 | int error; |
@@ -79,7 +79,7 @@ out: | |||
79 | */ | 79 | */ |
80 | 80 | ||
81 | struct xchk_bmap_info { | 81 | struct xchk_bmap_info { |
82 | struct xfs_scrub_context *sc; | 82 | struct xfs_scrub *sc; |
83 | xfs_fileoff_t lastoff; | 83 | xfs_fileoff_t lastoff; |
84 | bool is_rt; | 84 | bool is_rt; |
85 | bool is_shared; | 85 | bool is_shared; |
@@ -391,7 +391,7 @@ xchk_bmapbt_rec( | |||
391 | /* Scan the btree records. */ | 391 | /* Scan the btree records. */ |
392 | STATIC int | 392 | STATIC int |
393 | xchk_bmap_btree( | 393 | xchk_bmap_btree( |
394 | struct xfs_scrub_context *sc, | 394 | struct xfs_scrub *sc, |
395 | int whichfork, | 395 | int whichfork, |
396 | struct xchk_bmap_info *info) | 396 | struct xchk_bmap_info *info) |
397 | { | 397 | { |
@@ -409,7 +409,7 @@ xchk_bmap_btree( | |||
409 | } | 409 | } |
410 | 410 | ||
411 | struct xchk_bmap_check_rmap_info { | 411 | struct xchk_bmap_check_rmap_info { |
412 | struct xfs_scrub_context *sc; | 412 | struct xfs_scrub *sc; |
413 | int whichfork; | 413 | int whichfork; |
414 | struct xfs_iext_cursor icur; | 414 | struct xfs_iext_cursor icur; |
415 | }; | 415 | }; |
@@ -424,7 +424,7 @@ xchk_bmap_check_rmap( | |||
424 | struct xfs_bmbt_irec irec; | 424 | struct xfs_bmbt_irec irec; |
425 | struct xchk_bmap_check_rmap_info *sbcri = priv; | 425 | struct xchk_bmap_check_rmap_info *sbcri = priv; |
426 | struct xfs_ifork *ifp; | 426 | struct xfs_ifork *ifp; |
427 | struct xfs_scrub_context *sc = sbcri->sc; | 427 | struct xfs_scrub *sc = sbcri->sc; |
428 | bool have_map; | 428 | bool have_map; |
429 | 429 | ||
430 | /* Is this even the right fork? */ | 430 | /* Is this even the right fork? */ |
@@ -488,7 +488,7 @@ out: | |||
488 | /* Make sure each rmap has a corresponding bmbt entry. */ | 488 | /* Make sure each rmap has a corresponding bmbt entry. */ |
489 | STATIC int | 489 | STATIC int |
490 | xchk_bmap_check_ag_rmaps( | 490 | xchk_bmap_check_ag_rmaps( |
491 | struct xfs_scrub_context *sc, | 491 | struct xfs_scrub *sc, |
492 | int whichfork, | 492 | int whichfork, |
493 | xfs_agnumber_t agno) | 493 | xfs_agnumber_t agno) |
494 | { | 494 | { |
@@ -522,7 +522,7 @@ out_agf: | |||
522 | /* Make sure each rmap has a corresponding bmbt entry. */ | 522 | /* Make sure each rmap has a corresponding bmbt entry. */ |
523 | STATIC int | 523 | STATIC int |
524 | xchk_bmap_check_rmaps( | 524 | xchk_bmap_check_rmaps( |
525 | struct xfs_scrub_context *sc, | 525 | struct xfs_scrub *sc, |
526 | int whichfork) | 526 | int whichfork) |
527 | { | 527 | { |
528 | loff_t size; | 528 | loff_t size; |
@@ -579,7 +579,7 @@ xchk_bmap_check_rmaps( | |||
579 | */ | 579 | */ |
580 | STATIC int | 580 | STATIC int |
581 | xchk_bmap( | 581 | xchk_bmap( |
582 | struct xfs_scrub_context *sc, | 582 | struct xfs_scrub *sc, |
583 | int whichfork) | 583 | int whichfork) |
584 | { | 584 | { |
585 | struct xfs_bmbt_irec irec; | 585 | struct xfs_bmbt_irec irec; |
@@ -694,7 +694,7 @@ out: | |||
694 | /* Scrub an inode's data fork. */ | 694 | /* Scrub an inode's data fork. */ |
695 | int | 695 | int |
696 | xchk_bmap_data( | 696 | xchk_bmap_data( |
697 | struct xfs_scrub_context *sc) | 697 | struct xfs_scrub *sc) |
698 | { | 698 | { |
699 | return xchk_bmap(sc, XFS_DATA_FORK); | 699 | return xchk_bmap(sc, XFS_DATA_FORK); |
700 | } | 700 | } |
@@ -702,7 +702,7 @@ xchk_bmap_data( | |||
702 | /* Scrub an inode's attr fork. */ | 702 | /* Scrub an inode's attr fork. */ |
703 | int | 703 | int |
704 | xchk_bmap_attr( | 704 | xchk_bmap_attr( |
705 | struct xfs_scrub_context *sc) | 705 | struct xfs_scrub *sc) |
706 | { | 706 | { |
707 | return xchk_bmap(sc, XFS_ATTR_FORK); | 707 | return xchk_bmap(sc, XFS_ATTR_FORK); |
708 | } | 708 | } |
@@ -710,7 +710,7 @@ xchk_bmap_attr( | |||
710 | /* Scrub an inode's CoW fork. */ | 710 | /* Scrub an inode's CoW fork. */ |
711 | int | 711 | int |
712 | xchk_bmap_cow( | 712 | xchk_bmap_cow( |
713 | struct xfs_scrub_context *sc) | 713 | struct xfs_scrub *sc) |
714 | { | 714 | { |
715 | if (!xfs_is_reflink_inode(sc->ip)) | 715 | if (!xfs_is_reflink_inode(sc->ip)) |
716 | return -ENOENT; | 716 | return -ENOENT; |
diff --git a/fs/xfs/scrub/btree.c b/fs/xfs/scrub/btree.c index 30fe9a147959..c4e1dce8c5b3 100644 --- a/fs/xfs/scrub/btree.c +++ b/fs/xfs/scrub/btree.c | |||
@@ -30,7 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | static bool | 31 | static bool |
32 | __xchk_btree_process_error( | 32 | __xchk_btree_process_error( |
33 | struct xfs_scrub_context *sc, | 33 | struct xfs_scrub *sc, |
34 | struct xfs_btree_cur *cur, | 34 | struct xfs_btree_cur *cur, |
35 | int level, | 35 | int level, |
36 | int *error, | 36 | int *error, |
@@ -65,7 +65,7 @@ __xchk_btree_process_error( | |||
65 | 65 | ||
66 | bool | 66 | bool |
67 | xchk_btree_process_error( | 67 | xchk_btree_process_error( |
68 | struct xfs_scrub_context *sc, | 68 | struct xfs_scrub *sc, |
69 | struct xfs_btree_cur *cur, | 69 | struct xfs_btree_cur *cur, |
70 | int level, | 70 | int level, |
71 | int *error) | 71 | int *error) |
@@ -76,7 +76,7 @@ xchk_btree_process_error( | |||
76 | 76 | ||
77 | bool | 77 | bool |
78 | xchk_btree_xref_process_error( | 78 | xchk_btree_xref_process_error( |
79 | struct xfs_scrub_context *sc, | 79 | struct xfs_scrub *sc, |
80 | struct xfs_btree_cur *cur, | 80 | struct xfs_btree_cur *cur, |
81 | int level, | 81 | int level, |
82 | int *error) | 82 | int *error) |
@@ -88,7 +88,7 @@ xchk_btree_xref_process_error( | |||
88 | /* Record btree block corruption. */ | 88 | /* Record btree block corruption. */ |
89 | static void | 89 | static void |
90 | __xchk_btree_set_corrupt( | 90 | __xchk_btree_set_corrupt( |
91 | struct xfs_scrub_context *sc, | 91 | struct xfs_scrub *sc, |
92 | struct xfs_btree_cur *cur, | 92 | struct xfs_btree_cur *cur, |
93 | int level, | 93 | int level, |
94 | __u32 errflag, | 94 | __u32 errflag, |
@@ -106,7 +106,7 @@ __xchk_btree_set_corrupt( | |||
106 | 106 | ||
107 | void | 107 | void |
108 | xchk_btree_set_corrupt( | 108 | xchk_btree_set_corrupt( |
109 | struct xfs_scrub_context *sc, | 109 | struct xfs_scrub *sc, |
110 | struct xfs_btree_cur *cur, | 110 | struct xfs_btree_cur *cur, |
111 | int level) | 111 | int level) |
112 | { | 112 | { |
@@ -116,7 +116,7 @@ xchk_btree_set_corrupt( | |||
116 | 116 | ||
117 | void | 117 | void |
118 | xchk_btree_xref_set_corrupt( | 118 | xchk_btree_xref_set_corrupt( |
119 | struct xfs_scrub_context *sc, | 119 | struct xfs_scrub *sc, |
120 | struct xfs_btree_cur *cur, | 120 | struct xfs_btree_cur *cur, |
121 | int level) | 121 | int level) |
122 | { | 122 | { |
@@ -583,7 +583,7 @@ xchk_btree_block_keys( | |||
583 | */ | 583 | */ |
584 | int | 584 | int |
585 | xchk_btree( | 585 | xchk_btree( |
586 | struct xfs_scrub_context *sc, | 586 | struct xfs_scrub *sc, |
587 | struct xfs_btree_cur *cur, | 587 | struct xfs_btree_cur *cur, |
588 | xchk_btree_rec_fn scrub_fn, | 588 | xchk_btree_rec_fn scrub_fn, |
589 | struct xfs_owner_info *oinfo, | 589 | struct xfs_owner_info *oinfo, |
diff --git a/fs/xfs/scrub/btree.h b/fs/xfs/scrub/btree.h index 598ac04a6c3e..a0b74b515b9b 100644 --- a/fs/xfs/scrub/btree.h +++ b/fs/xfs/scrub/btree.h | |||
@@ -9,20 +9,20 @@ | |||
9 | /* btree scrub */ | 9 | /* btree scrub */ |
10 | 10 | ||
11 | /* Check for btree operation errors. */ | 11 | /* Check for btree operation errors. */ |
12 | bool xchk_btree_process_error(struct xfs_scrub_context *sc, | 12 | bool xchk_btree_process_error(struct xfs_scrub *sc, |
13 | struct xfs_btree_cur *cur, int level, int *error); | 13 | struct xfs_btree_cur *cur, int level, int *error); |
14 | 14 | ||
15 | /* Check for btree xref operation errors. */ | 15 | /* Check for btree xref operation errors. */ |
16 | bool xchk_btree_xref_process_error(struct xfs_scrub_context *sc, | 16 | bool xchk_btree_xref_process_error(struct xfs_scrub *sc, |
17 | struct xfs_btree_cur *cur, int level, | 17 | struct xfs_btree_cur *cur, int level, |
18 | int *error); | 18 | int *error); |
19 | 19 | ||
20 | /* Check for btree corruption. */ | 20 | /* Check for btree corruption. */ |
21 | void xchk_btree_set_corrupt(struct xfs_scrub_context *sc, | 21 | void xchk_btree_set_corrupt(struct xfs_scrub *sc, |
22 | struct xfs_btree_cur *cur, int level); | 22 | struct xfs_btree_cur *cur, int level); |
23 | 23 | ||
24 | /* Check for btree xref discrepancies. */ | 24 | /* Check for btree xref discrepancies. */ |
25 | void xchk_btree_xref_set_corrupt(struct xfs_scrub_context *sc, | 25 | void xchk_btree_xref_set_corrupt(struct xfs_scrub *sc, |
26 | struct xfs_btree_cur *cur, int level); | 26 | struct xfs_btree_cur *cur, int level); |
27 | 27 | ||
28 | struct xchk_btree; | 28 | struct xchk_btree; |
@@ -32,7 +32,7 @@ typedef int (*xchk_btree_rec_fn)( | |||
32 | 32 | ||
33 | struct xchk_btree { | 33 | struct xchk_btree { |
34 | /* caller-provided scrub state */ | 34 | /* caller-provided scrub state */ |
35 | struct xfs_scrub_context *sc; | 35 | struct xfs_scrub *sc; |
36 | struct xfs_btree_cur *cur; | 36 | struct xfs_btree_cur *cur; |
37 | xchk_btree_rec_fn scrub_rec; | 37 | xchk_btree_rec_fn scrub_rec; |
38 | struct xfs_owner_info *oinfo; | 38 | struct xfs_owner_info *oinfo; |
@@ -45,7 +45,7 @@ struct xchk_btree { | |||
45 | bool firstkey[XFS_BTREE_MAXLEVELS]; | 45 | bool firstkey[XFS_BTREE_MAXLEVELS]; |
46 | struct list_head to_check; | 46 | struct list_head to_check; |
47 | }; | 47 | }; |
48 | int xchk_btree(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 48 | int xchk_btree(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
49 | xchk_btree_rec_fn scrub_fn, | 49 | xchk_btree_rec_fn scrub_fn, |
50 | struct xfs_owner_info *oinfo, void *private); | 50 | struct xfs_owner_info *oinfo, void *private); |
51 | 51 | ||
diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index d40bba9e7596..ed9195116556 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c | |||
@@ -69,7 +69,7 @@ | |||
69 | /* Check for operational errors. */ | 69 | /* Check for operational errors. */ |
70 | static bool | 70 | static bool |
71 | __xchk_process_error( | 71 | __xchk_process_error( |
72 | struct xfs_scrub_context *sc, | 72 | struct xfs_scrub *sc, |
73 | xfs_agnumber_t agno, | 73 | xfs_agnumber_t agno, |
74 | xfs_agblock_t bno, | 74 | xfs_agblock_t bno, |
75 | int *error, | 75 | int *error, |
@@ -99,7 +99,7 @@ __xchk_process_error( | |||
99 | 99 | ||
100 | bool | 100 | bool |
101 | xchk_process_error( | 101 | xchk_process_error( |
102 | struct xfs_scrub_context *sc, | 102 | struct xfs_scrub *sc, |
103 | xfs_agnumber_t agno, | 103 | xfs_agnumber_t agno, |
104 | xfs_agblock_t bno, | 104 | xfs_agblock_t bno, |
105 | int *error) | 105 | int *error) |
@@ -110,7 +110,7 @@ xchk_process_error( | |||
110 | 110 | ||
111 | bool | 111 | bool |
112 | xchk_xref_process_error( | 112 | xchk_xref_process_error( |
113 | struct xfs_scrub_context *sc, | 113 | struct xfs_scrub *sc, |
114 | xfs_agnumber_t agno, | 114 | xfs_agnumber_t agno, |
115 | xfs_agblock_t bno, | 115 | xfs_agblock_t bno, |
116 | int *error) | 116 | int *error) |
@@ -122,7 +122,7 @@ xchk_xref_process_error( | |||
122 | /* Check for operational errors for a file offset. */ | 122 | /* Check for operational errors for a file offset. */ |
123 | static bool | 123 | static bool |
124 | __xchk_fblock_process_error( | 124 | __xchk_fblock_process_error( |
125 | struct xfs_scrub_context *sc, | 125 | struct xfs_scrub *sc, |
126 | int whichfork, | 126 | int whichfork, |
127 | xfs_fileoff_t offset, | 127 | xfs_fileoff_t offset, |
128 | int *error, | 128 | int *error, |
@@ -152,7 +152,7 @@ __xchk_fblock_process_error( | |||
152 | 152 | ||
153 | bool | 153 | bool |
154 | xchk_fblock_process_error( | 154 | xchk_fblock_process_error( |
155 | struct xfs_scrub_context *sc, | 155 | struct xfs_scrub *sc, |
156 | int whichfork, | 156 | int whichfork, |
157 | xfs_fileoff_t offset, | 157 | xfs_fileoff_t offset, |
158 | int *error) | 158 | int *error) |
@@ -163,7 +163,7 @@ xchk_fblock_process_error( | |||
163 | 163 | ||
164 | bool | 164 | bool |
165 | xchk_fblock_xref_process_error( | 165 | xchk_fblock_xref_process_error( |
166 | struct xfs_scrub_context *sc, | 166 | struct xfs_scrub *sc, |
167 | int whichfork, | 167 | int whichfork, |
168 | xfs_fileoff_t offset, | 168 | xfs_fileoff_t offset, |
169 | int *error) | 169 | int *error) |
@@ -187,7 +187,7 @@ xchk_fblock_xref_process_error( | |||
187 | /* Record a block which could be optimized. */ | 187 | /* Record a block which could be optimized. */ |
188 | void | 188 | void |
189 | xchk_block_set_preen( | 189 | xchk_block_set_preen( |
190 | struct xfs_scrub_context *sc, | 190 | struct xfs_scrub *sc, |
191 | struct xfs_buf *bp) | 191 | struct xfs_buf *bp) |
192 | { | 192 | { |
193 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; | 193 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; |
@@ -201,7 +201,7 @@ xchk_block_set_preen( | |||
201 | */ | 201 | */ |
202 | void | 202 | void |
203 | xchk_ino_set_preen( | 203 | xchk_ino_set_preen( |
204 | struct xfs_scrub_context *sc, | 204 | struct xfs_scrub *sc, |
205 | xfs_ino_t ino) | 205 | xfs_ino_t ino) |
206 | { | 206 | { |
207 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; | 207 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; |
@@ -211,7 +211,7 @@ xchk_ino_set_preen( | |||
211 | /* Record a corrupt block. */ | 211 | /* Record a corrupt block. */ |
212 | void | 212 | void |
213 | xchk_block_set_corrupt( | 213 | xchk_block_set_corrupt( |
214 | struct xfs_scrub_context *sc, | 214 | struct xfs_scrub *sc, |
215 | struct xfs_buf *bp) | 215 | struct xfs_buf *bp) |
216 | { | 216 | { |
217 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; | 217 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; |
@@ -221,7 +221,7 @@ xchk_block_set_corrupt( | |||
221 | /* Record a corruption while cross-referencing. */ | 221 | /* Record a corruption while cross-referencing. */ |
222 | void | 222 | void |
223 | xchk_block_xref_set_corrupt( | 223 | xchk_block_xref_set_corrupt( |
224 | struct xfs_scrub_context *sc, | 224 | struct xfs_scrub *sc, |
225 | struct xfs_buf *bp) | 225 | struct xfs_buf *bp) |
226 | { | 226 | { |
227 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; | 227 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; |
@@ -235,7 +235,7 @@ xchk_block_xref_set_corrupt( | |||
235 | */ | 235 | */ |
236 | void | 236 | void |
237 | xchk_ino_set_corrupt( | 237 | xchk_ino_set_corrupt( |
238 | struct xfs_scrub_context *sc, | 238 | struct xfs_scrub *sc, |
239 | xfs_ino_t ino) | 239 | xfs_ino_t ino) |
240 | { | 240 | { |
241 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; | 241 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; |
@@ -245,7 +245,7 @@ xchk_ino_set_corrupt( | |||
245 | /* Record a corruption while cross-referencing with an inode. */ | 245 | /* Record a corruption while cross-referencing with an inode. */ |
246 | void | 246 | void |
247 | xchk_ino_xref_set_corrupt( | 247 | xchk_ino_xref_set_corrupt( |
248 | struct xfs_scrub_context *sc, | 248 | struct xfs_scrub *sc, |
249 | xfs_ino_t ino) | 249 | xfs_ino_t ino) |
250 | { | 250 | { |
251 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; | 251 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; |
@@ -255,7 +255,7 @@ xchk_ino_xref_set_corrupt( | |||
255 | /* Record corruption in a block indexed by a file fork. */ | 255 | /* Record corruption in a block indexed by a file fork. */ |
256 | void | 256 | void |
257 | xchk_fblock_set_corrupt( | 257 | xchk_fblock_set_corrupt( |
258 | struct xfs_scrub_context *sc, | 258 | struct xfs_scrub *sc, |
259 | int whichfork, | 259 | int whichfork, |
260 | xfs_fileoff_t offset) | 260 | xfs_fileoff_t offset) |
261 | { | 261 | { |
@@ -266,7 +266,7 @@ xchk_fblock_set_corrupt( | |||
266 | /* Record a corruption while cross-referencing a fork block. */ | 266 | /* Record a corruption while cross-referencing a fork block. */ |
267 | void | 267 | void |
268 | xchk_fblock_xref_set_corrupt( | 268 | xchk_fblock_xref_set_corrupt( |
269 | struct xfs_scrub_context *sc, | 269 | struct xfs_scrub *sc, |
270 | int whichfork, | 270 | int whichfork, |
271 | xfs_fileoff_t offset) | 271 | xfs_fileoff_t offset) |
272 | { | 272 | { |
@@ -280,7 +280,7 @@ xchk_fblock_xref_set_corrupt( | |||
280 | */ | 280 | */ |
281 | void | 281 | void |
282 | xchk_ino_set_warning( | 282 | xchk_ino_set_warning( |
283 | struct xfs_scrub_context *sc, | 283 | struct xfs_scrub *sc, |
284 | xfs_ino_t ino) | 284 | xfs_ino_t ino) |
285 | { | 285 | { |
286 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_WARNING; | 286 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_WARNING; |
@@ -290,7 +290,7 @@ xchk_ino_set_warning( | |||
290 | /* Warn about a block indexed by a file fork that needs review. */ | 290 | /* Warn about a block indexed by a file fork that needs review. */ |
291 | void | 291 | void |
292 | xchk_fblock_set_warning( | 292 | xchk_fblock_set_warning( |
293 | struct xfs_scrub_context *sc, | 293 | struct xfs_scrub *sc, |
294 | int whichfork, | 294 | int whichfork, |
295 | xfs_fileoff_t offset) | 295 | xfs_fileoff_t offset) |
296 | { | 296 | { |
@@ -301,7 +301,7 @@ xchk_fblock_set_warning( | |||
301 | /* Signal an incomplete scrub. */ | 301 | /* Signal an incomplete scrub. */ |
302 | void | 302 | void |
303 | xchk_set_incomplete( | 303 | xchk_set_incomplete( |
304 | struct xfs_scrub_context *sc) | 304 | struct xfs_scrub *sc) |
305 | { | 305 | { |
306 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_INCOMPLETE; | 306 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_INCOMPLETE; |
307 | trace_xchk_incomplete(sc, __return_address); | 307 | trace_xchk_incomplete(sc, __return_address); |
@@ -345,7 +345,7 @@ xchk_count_rmap_ownedby_irec( | |||
345 | */ | 345 | */ |
346 | int | 346 | int |
347 | xchk_count_rmap_ownedby_ag( | 347 | xchk_count_rmap_ownedby_ag( |
348 | struct xfs_scrub_context *sc, | 348 | struct xfs_scrub *sc, |
349 | struct xfs_btree_cur *cur, | 349 | struct xfs_btree_cur *cur, |
350 | struct xfs_owner_info *oinfo, | 350 | struct xfs_owner_info *oinfo, |
351 | xfs_filblks_t *blocks) | 351 | xfs_filblks_t *blocks) |
@@ -371,7 +371,7 @@ xchk_count_rmap_ownedby_ag( | |||
371 | /* Decide if we want to return an AG header read failure. */ | 371 | /* Decide if we want to return an AG header read failure. */ |
372 | static inline bool | 372 | static inline bool |
373 | want_ag_read_header_failure( | 373 | want_ag_read_header_failure( |
374 | struct xfs_scrub_context *sc, | 374 | struct xfs_scrub *sc, |
375 | unsigned int type) | 375 | unsigned int type) |
376 | { | 376 | { |
377 | /* Return all AG header read failures when scanning btrees. */ | 377 | /* Return all AG header read failures when scanning btrees. */ |
@@ -398,7 +398,7 @@ want_ag_read_header_failure( | |||
398 | */ | 398 | */ |
399 | int | 399 | int |
400 | xchk_ag_read_headers( | 400 | xchk_ag_read_headers( |
401 | struct xfs_scrub_context *sc, | 401 | struct xfs_scrub *sc, |
402 | xfs_agnumber_t agno, | 402 | xfs_agnumber_t agno, |
403 | struct xfs_buf **agi, | 403 | struct xfs_buf **agi, |
404 | struct xfs_buf **agf, | 404 | struct xfs_buf **agf, |
@@ -452,7 +452,7 @@ xchk_ag_btcur_free( | |||
452 | /* Initialize all the btree cursors for an AG. */ | 452 | /* Initialize all the btree cursors for an AG. */ |
453 | int | 453 | int |
454 | xchk_ag_btcur_init( | 454 | xchk_ag_btcur_init( |
455 | struct xfs_scrub_context *sc, | 455 | struct xfs_scrub *sc, |
456 | struct xchk_ag *sa) | 456 | struct xchk_ag *sa) |
457 | { | 457 | { |
458 | struct xfs_mount *mp = sc->mp; | 458 | struct xfs_mount *mp = sc->mp; |
@@ -512,7 +512,7 @@ err: | |||
512 | /* Release the AG header context and btree cursors. */ | 512 | /* Release the AG header context and btree cursors. */ |
513 | void | 513 | void |
514 | xchk_ag_free( | 514 | xchk_ag_free( |
515 | struct xfs_scrub_context *sc, | 515 | struct xfs_scrub *sc, |
516 | struct xchk_ag *sa) | 516 | struct xchk_ag *sa) |
517 | { | 517 | { |
518 | xchk_ag_btcur_free(sa); | 518 | xchk_ag_btcur_free(sa); |
@@ -544,7 +544,7 @@ xchk_ag_free( | |||
544 | */ | 544 | */ |
545 | int | 545 | int |
546 | xchk_ag_init( | 546 | xchk_ag_init( |
547 | struct xfs_scrub_context *sc, | 547 | struct xfs_scrub *sc, |
548 | xfs_agnumber_t agno, | 548 | xfs_agnumber_t agno, |
549 | struct xchk_ag *sa) | 549 | struct xchk_ag *sa) |
550 | { | 550 | { |
@@ -586,7 +586,7 @@ xchk_perag_get( | |||
586 | */ | 586 | */ |
587 | int | 587 | int |
588 | xchk_trans_alloc( | 588 | xchk_trans_alloc( |
589 | struct xfs_scrub_context *sc, | 589 | struct xfs_scrub *sc, |
590 | uint resblks) | 590 | uint resblks) |
591 | { | 591 | { |
592 | if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) | 592 | if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) |
@@ -599,7 +599,7 @@ xchk_trans_alloc( | |||
599 | /* Set us up with a transaction and an empty context. */ | 599 | /* Set us up with a transaction and an empty context. */ |
600 | int | 600 | int |
601 | xchk_setup_fs( | 601 | xchk_setup_fs( |
602 | struct xfs_scrub_context *sc, | 602 | struct xfs_scrub *sc, |
603 | struct xfs_inode *ip) | 603 | struct xfs_inode *ip) |
604 | { | 604 | { |
605 | uint resblks; | 605 | uint resblks; |
@@ -611,7 +611,7 @@ xchk_setup_fs( | |||
611 | /* Set us up with AG headers and btree cursors. */ | 611 | /* Set us up with AG headers and btree cursors. */ |
612 | int | 612 | int |
613 | xchk_setup_ag_btree( | 613 | xchk_setup_ag_btree( |
614 | struct xfs_scrub_context *sc, | 614 | struct xfs_scrub *sc, |
615 | struct xfs_inode *ip, | 615 | struct xfs_inode *ip, |
616 | bool force_log) | 616 | bool force_log) |
617 | { | 617 | { |
@@ -658,7 +658,7 @@ xchk_checkpoint_log( | |||
658 | */ | 658 | */ |
659 | int | 659 | int |
660 | xchk_get_inode( | 660 | xchk_get_inode( |
661 | struct xfs_scrub_context *sc, | 661 | struct xfs_scrub *sc, |
662 | struct xfs_inode *ip_in) | 662 | struct xfs_inode *ip_in) |
663 | { | 663 | { |
664 | struct xfs_imap imap; | 664 | struct xfs_imap imap; |
@@ -722,7 +722,7 @@ xchk_get_inode( | |||
722 | /* Set us up to scrub a file's contents. */ | 722 | /* Set us up to scrub a file's contents. */ |
723 | int | 723 | int |
724 | xchk_setup_inode_contents( | 724 | xchk_setup_inode_contents( |
725 | struct xfs_scrub_context *sc, | 725 | struct xfs_scrub *sc, |
726 | struct xfs_inode *ip, | 726 | struct xfs_inode *ip, |
727 | unsigned int resblks) | 727 | unsigned int resblks) |
728 | { | 728 | { |
@@ -753,7 +753,7 @@ out: | |||
753 | */ | 753 | */ |
754 | bool | 754 | bool |
755 | xchk_should_check_xref( | 755 | xchk_should_check_xref( |
756 | struct xfs_scrub_context *sc, | 756 | struct xfs_scrub *sc, |
757 | int *error, | 757 | int *error, |
758 | struct xfs_btree_cur **curpp) | 758 | struct xfs_btree_cur **curpp) |
759 | { | 759 | { |
@@ -788,7 +788,7 @@ xchk_should_check_xref( | |||
788 | /* Run the structure verifiers on in-memory buffers to detect bad memory. */ | 788 | /* Run the structure verifiers on in-memory buffers to detect bad memory. */ |
789 | void | 789 | void |
790 | xchk_buffer_recheck( | 790 | xchk_buffer_recheck( |
791 | struct xfs_scrub_context *sc, | 791 | struct xfs_scrub *sc, |
792 | struct xfs_buf *bp) | 792 | struct xfs_buf *bp) |
793 | { | 793 | { |
794 | xfs_failaddr_t fa; | 794 | xfs_failaddr_t fa; |
@@ -814,7 +814,7 @@ xchk_buffer_recheck( | |||
814 | */ | 814 | */ |
815 | int | 815 | int |
816 | xchk_metadata_inode_forks( | 816 | xchk_metadata_inode_forks( |
817 | struct xfs_scrub_context *sc) | 817 | struct xfs_scrub *sc) |
818 | { | 818 | { |
819 | __u32 smtype; | 819 | __u32 smtype; |
820 | bool shared; | 820 | bool shared; |
diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h index 5881cb2ecc26..c321230d32dc 100644 --- a/fs/xfs/scrub/common.h +++ b/fs/xfs/scrub/common.h | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | static inline bool | 14 | static inline bool |
15 | xchk_should_terminate( | 15 | xchk_should_terminate( |
16 | struct xfs_scrub_context *sc, | 16 | struct xfs_scrub *sc, |
17 | int *error) | 17 | int *error) |
18 | { | 18 | { |
19 | if (fatal_signal_pending(current)) { | 19 | if (fatal_signal_pending(current)) { |
@@ -24,109 +24,109 @@ xchk_should_terminate( | |||
24 | return false; | 24 | return false; |
25 | } | 25 | } |
26 | 26 | ||
27 | int xchk_trans_alloc(struct xfs_scrub_context *sc, uint resblks); | 27 | int xchk_trans_alloc(struct xfs_scrub *sc, uint resblks); |
28 | bool xchk_process_error(struct xfs_scrub_context *sc, xfs_agnumber_t agno, | 28 | bool xchk_process_error(struct xfs_scrub *sc, xfs_agnumber_t agno, |
29 | xfs_agblock_t bno, int *error); | 29 | xfs_agblock_t bno, int *error); |
30 | bool xchk_fblock_process_error(struct xfs_scrub_context *sc, int whichfork, | 30 | bool xchk_fblock_process_error(struct xfs_scrub *sc, int whichfork, |
31 | xfs_fileoff_t offset, int *error); | 31 | xfs_fileoff_t offset, int *error); |
32 | 32 | ||
33 | bool xchk_xref_process_error(struct xfs_scrub_context *sc, | 33 | bool xchk_xref_process_error(struct xfs_scrub *sc, |
34 | xfs_agnumber_t agno, xfs_agblock_t bno, int *error); | 34 | xfs_agnumber_t agno, xfs_agblock_t bno, int *error); |
35 | bool xchk_fblock_xref_process_error(struct xfs_scrub_context *sc, | 35 | bool xchk_fblock_xref_process_error(struct xfs_scrub *sc, |
36 | int whichfork, xfs_fileoff_t offset, int *error); | 36 | int whichfork, xfs_fileoff_t offset, int *error); |
37 | 37 | ||
38 | void xchk_block_set_preen(struct xfs_scrub_context *sc, | 38 | void xchk_block_set_preen(struct xfs_scrub *sc, |
39 | struct xfs_buf *bp); | 39 | struct xfs_buf *bp); |
40 | void xchk_ino_set_preen(struct xfs_scrub_context *sc, xfs_ino_t ino); | 40 | void xchk_ino_set_preen(struct xfs_scrub *sc, xfs_ino_t ino); |
41 | 41 | ||
42 | void xchk_block_set_corrupt(struct xfs_scrub_context *sc, | 42 | void xchk_block_set_corrupt(struct xfs_scrub *sc, |
43 | struct xfs_buf *bp); | 43 | struct xfs_buf *bp); |
44 | void xchk_ino_set_corrupt(struct xfs_scrub_context *sc, xfs_ino_t ino); | 44 | void xchk_ino_set_corrupt(struct xfs_scrub *sc, xfs_ino_t ino); |
45 | void xchk_fblock_set_corrupt(struct xfs_scrub_context *sc, int whichfork, | 45 | void xchk_fblock_set_corrupt(struct xfs_scrub *sc, int whichfork, |
46 | xfs_fileoff_t offset); | 46 | xfs_fileoff_t offset); |
47 | 47 | ||
48 | void xchk_block_xref_set_corrupt(struct xfs_scrub_context *sc, | 48 | void xchk_block_xref_set_corrupt(struct xfs_scrub *sc, |
49 | struct xfs_buf *bp); | 49 | struct xfs_buf *bp); |
50 | void xchk_ino_xref_set_corrupt(struct xfs_scrub_context *sc, | 50 | void xchk_ino_xref_set_corrupt(struct xfs_scrub *sc, |
51 | xfs_ino_t ino); | 51 | xfs_ino_t ino); |
52 | void xchk_fblock_xref_set_corrupt(struct xfs_scrub_context *sc, | 52 | void xchk_fblock_xref_set_corrupt(struct xfs_scrub *sc, |
53 | int whichfork, xfs_fileoff_t offset); | 53 | int whichfork, xfs_fileoff_t offset); |
54 | 54 | ||
55 | void xchk_ino_set_warning(struct xfs_scrub_context *sc, xfs_ino_t ino); | 55 | void xchk_ino_set_warning(struct xfs_scrub *sc, xfs_ino_t ino); |
56 | void xchk_fblock_set_warning(struct xfs_scrub_context *sc, int whichfork, | 56 | void xchk_fblock_set_warning(struct xfs_scrub *sc, int whichfork, |
57 | xfs_fileoff_t offset); | 57 | xfs_fileoff_t offset); |
58 | 58 | ||
59 | void xchk_set_incomplete(struct xfs_scrub_context *sc); | 59 | void xchk_set_incomplete(struct xfs_scrub *sc); |
60 | int xchk_checkpoint_log(struct xfs_mount *mp); | 60 | int xchk_checkpoint_log(struct xfs_mount *mp); |
61 | 61 | ||
62 | /* Are we set up for a cross-referencing check? */ | 62 | /* Are we set up for a cross-referencing check? */ |
63 | bool xchk_should_check_xref(struct xfs_scrub_context *sc, int *error, | 63 | bool xchk_should_check_xref(struct xfs_scrub *sc, int *error, |
64 | struct xfs_btree_cur **curpp); | 64 | struct xfs_btree_cur **curpp); |
65 | 65 | ||
66 | /* Setup functions */ | 66 | /* Setup functions */ |
67 | int xchk_setup_fs(struct xfs_scrub_context *sc, struct xfs_inode *ip); | 67 | int xchk_setup_fs(struct xfs_scrub *sc, struct xfs_inode *ip); |
68 | int xchk_setup_ag_allocbt(struct xfs_scrub_context *sc, | 68 | int xchk_setup_ag_allocbt(struct xfs_scrub *sc, |
69 | struct xfs_inode *ip); | 69 | struct xfs_inode *ip); |
70 | int xchk_setup_ag_iallocbt(struct xfs_scrub_context *sc, | 70 | int xchk_setup_ag_iallocbt(struct xfs_scrub *sc, |
71 | struct xfs_inode *ip); | 71 | struct xfs_inode *ip); |
72 | int xchk_setup_ag_rmapbt(struct xfs_scrub_context *sc, | 72 | int xchk_setup_ag_rmapbt(struct xfs_scrub *sc, |
73 | struct xfs_inode *ip); | 73 | struct xfs_inode *ip); |
74 | int xchk_setup_ag_refcountbt(struct xfs_scrub_context *sc, | 74 | int xchk_setup_ag_refcountbt(struct xfs_scrub *sc, |
75 | struct xfs_inode *ip); | 75 | struct xfs_inode *ip); |
76 | int xchk_setup_inode(struct xfs_scrub_context *sc, | 76 | int xchk_setup_inode(struct xfs_scrub *sc, |
77 | struct xfs_inode *ip); | 77 | struct xfs_inode *ip); |
78 | int xchk_setup_inode_bmap(struct xfs_scrub_context *sc, | 78 | int xchk_setup_inode_bmap(struct xfs_scrub *sc, |
79 | struct xfs_inode *ip); | 79 | struct xfs_inode *ip); |
80 | int xchk_setup_inode_bmap_data(struct xfs_scrub_context *sc, | 80 | int xchk_setup_inode_bmap_data(struct xfs_scrub *sc, |
81 | struct xfs_inode *ip); | 81 | struct xfs_inode *ip); |
82 | int xchk_setup_directory(struct xfs_scrub_context *sc, | 82 | int xchk_setup_directory(struct xfs_scrub *sc, |
83 | struct xfs_inode *ip); | 83 | struct xfs_inode *ip); |
84 | int xchk_setup_xattr(struct xfs_scrub_context *sc, | 84 | int xchk_setup_xattr(struct xfs_scrub *sc, |
85 | struct xfs_inode *ip); | 85 | struct xfs_inode *ip); |
86 | int xchk_setup_symlink(struct xfs_scrub_context *sc, | 86 | int xchk_setup_symlink(struct xfs_scrub *sc, |
87 | struct xfs_inode *ip); | 87 | struct xfs_inode *ip); |
88 | int xchk_setup_parent(struct xfs_scrub_context *sc, | 88 | int xchk_setup_parent(struct xfs_scrub *sc, |
89 | struct xfs_inode *ip); | 89 | struct xfs_inode *ip); |
90 | #ifdef CONFIG_XFS_RT | 90 | #ifdef CONFIG_XFS_RT |
91 | int xchk_setup_rt(struct xfs_scrub_context *sc, struct xfs_inode *ip); | 91 | int xchk_setup_rt(struct xfs_scrub *sc, struct xfs_inode *ip); |
92 | #else | 92 | #else |
93 | static inline int | 93 | static inline int |
94 | xchk_setup_rt(struct xfs_scrub_context *sc, struct xfs_inode *ip) | 94 | xchk_setup_rt(struct xfs_scrub *sc, struct xfs_inode *ip) |
95 | { | 95 | { |
96 | return -ENOENT; | 96 | return -ENOENT; |
97 | } | 97 | } |
98 | #endif | 98 | #endif |
99 | #ifdef CONFIG_XFS_QUOTA | 99 | #ifdef CONFIG_XFS_QUOTA |
100 | int xchk_setup_quota(struct xfs_scrub_context *sc, struct xfs_inode *ip); | 100 | int xchk_setup_quota(struct xfs_scrub *sc, struct xfs_inode *ip); |
101 | #else | 101 | #else |
102 | static inline int | 102 | static inline int |
103 | xchk_setup_quota(struct xfs_scrub_context *sc, struct xfs_inode *ip) | 103 | xchk_setup_quota(struct xfs_scrub *sc, struct xfs_inode *ip) |
104 | { | 104 | { |
105 | return -ENOENT; | 105 | return -ENOENT; |
106 | } | 106 | } |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | void xchk_ag_free(struct xfs_scrub_context *sc, struct xchk_ag *sa); | 109 | void xchk_ag_free(struct xfs_scrub *sc, struct xchk_ag *sa); |
110 | int xchk_ag_init(struct xfs_scrub_context *sc, xfs_agnumber_t agno, | 110 | int xchk_ag_init(struct xfs_scrub *sc, xfs_agnumber_t agno, |
111 | struct xchk_ag *sa); | 111 | struct xchk_ag *sa); |
112 | void xchk_perag_get(struct xfs_mount *mp, struct xchk_ag *sa); | 112 | void xchk_perag_get(struct xfs_mount *mp, struct xchk_ag *sa); |
113 | int xchk_ag_read_headers(struct xfs_scrub_context *sc, xfs_agnumber_t agno, | 113 | int xchk_ag_read_headers(struct xfs_scrub *sc, xfs_agnumber_t agno, |
114 | struct xfs_buf **agi, struct xfs_buf **agf, | 114 | struct xfs_buf **agi, struct xfs_buf **agf, |
115 | struct xfs_buf **agfl); | 115 | struct xfs_buf **agfl); |
116 | void xchk_ag_btcur_free(struct xchk_ag *sa); | 116 | void xchk_ag_btcur_free(struct xchk_ag *sa); |
117 | int xchk_ag_btcur_init(struct xfs_scrub_context *sc, | 117 | int xchk_ag_btcur_init(struct xfs_scrub *sc, |
118 | struct xchk_ag *sa); | 118 | struct xchk_ag *sa); |
119 | int xchk_count_rmap_ownedby_ag(struct xfs_scrub_context *sc, | 119 | int xchk_count_rmap_ownedby_ag(struct xfs_scrub *sc, |
120 | struct xfs_btree_cur *cur, | 120 | struct xfs_btree_cur *cur, |
121 | struct xfs_owner_info *oinfo, | 121 | struct xfs_owner_info *oinfo, |
122 | xfs_filblks_t *blocks); | 122 | xfs_filblks_t *blocks); |
123 | 123 | ||
124 | int xchk_setup_ag_btree(struct xfs_scrub_context *sc, | 124 | int xchk_setup_ag_btree(struct xfs_scrub *sc, |
125 | struct xfs_inode *ip, bool force_log); | 125 | struct xfs_inode *ip, bool force_log); |
126 | int xchk_get_inode(struct xfs_scrub_context *sc, struct xfs_inode *ip_in); | 126 | int xchk_get_inode(struct xfs_scrub *sc, struct xfs_inode *ip_in); |
127 | int xchk_setup_inode_contents(struct xfs_scrub_context *sc, | 127 | int xchk_setup_inode_contents(struct xfs_scrub *sc, |
128 | struct xfs_inode *ip, unsigned int resblks); | 128 | struct xfs_inode *ip, unsigned int resblks); |
129 | void xchk_buffer_recheck(struct xfs_scrub_context *sc, struct xfs_buf *bp); | 129 | void xchk_buffer_recheck(struct xfs_scrub *sc, struct xfs_buf *bp); |
130 | 130 | ||
131 | /* | 131 | /* |
132 | * Don't bother cross-referencing if we already found corruption or cross | 132 | * Don't bother cross-referencing if we already found corruption or cross |
@@ -138,7 +138,7 @@ static inline bool xchk_skip_xref(struct xfs_scrub_metadata *sm) | |||
138 | XFS_SCRUB_OFLAG_XCORRUPT); | 138 | XFS_SCRUB_OFLAG_XCORRUPT); |
139 | } | 139 | } |
140 | 140 | ||
141 | int xchk_metadata_inode_forks(struct xfs_scrub_context *sc); | 141 | int xchk_metadata_inode_forks(struct xfs_scrub *sc); |
142 | int xchk_ilock_inverted(struct xfs_inode *ip, uint lock_mode); | 142 | int xchk_ilock_inverted(struct xfs_inode *ip, uint lock_mode); |
143 | 143 | ||
144 | #endif /* __XFS_SCRUB_COMMON_H__ */ | 144 | #endif /* __XFS_SCRUB_COMMON_H__ */ |
diff --git a/fs/xfs/scrub/dabtree.c b/fs/xfs/scrub/dabtree.c index fee80f6ddfd7..7fc12d540ea6 100644 --- a/fs/xfs/scrub/dabtree.c +++ b/fs/xfs/scrub/dabtree.c | |||
@@ -40,7 +40,7 @@ xchk_da_process_error( | |||
40 | int level, | 40 | int level, |
41 | int *error) | 41 | int *error) |
42 | { | 42 | { |
43 | struct xfs_scrub_context *sc = ds->sc; | 43 | struct xfs_scrub *sc = ds->sc; |
44 | 44 | ||
45 | if (*error == 0) | 45 | if (*error == 0) |
46 | return true; | 46 | return true; |
@@ -75,7 +75,7 @@ xchk_da_set_corrupt( | |||
75 | struct xchk_da_btree *ds, | 75 | struct xchk_da_btree *ds, |
76 | int level) | 76 | int level) |
77 | { | 77 | { |
78 | struct xfs_scrub_context *sc = ds->sc; | 78 | struct xfs_scrub *sc = ds->sc; |
79 | 79 | ||
80 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; | 80 | sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; |
81 | 81 | ||
@@ -474,7 +474,7 @@ out_nobuf: | |||
474 | /* Visit all nodes and leaves of a da btree. */ | 474 | /* Visit all nodes and leaves of a da btree. */ |
475 | int | 475 | int |
476 | xchk_da_btree( | 476 | xchk_da_btree( |
477 | struct xfs_scrub_context *sc, | 477 | struct xfs_scrub *sc, |
478 | int whichfork, | 478 | int whichfork, |
479 | xchk_da_btree_rec_fn scrub_fn, | 479 | xchk_da_btree_rec_fn scrub_fn, |
480 | void *private) | 480 | void *private) |
diff --git a/fs/xfs/scrub/dabtree.h b/fs/xfs/scrub/dabtree.h index 80e4af0e2589..a15c03389e8f 100644 --- a/fs/xfs/scrub/dabtree.h +++ b/fs/xfs/scrub/dabtree.h | |||
@@ -13,7 +13,7 @@ struct xchk_da_btree { | |||
13 | xfs_dahash_t hashes[XFS_DA_NODE_MAXDEPTH]; | 13 | xfs_dahash_t hashes[XFS_DA_NODE_MAXDEPTH]; |
14 | int maxrecs[XFS_DA_NODE_MAXDEPTH]; | 14 | int maxrecs[XFS_DA_NODE_MAXDEPTH]; |
15 | struct xfs_da_state *state; | 15 | struct xfs_da_state *state; |
16 | struct xfs_scrub_context *sc; | 16 | struct xfs_scrub *sc; |
17 | void *private; | 17 | void *private; |
18 | 18 | ||
19 | /* | 19 | /* |
@@ -39,7 +39,7 @@ void xchk_da_set_corrupt(struct xchk_da_btree *ds, int level); | |||
39 | 39 | ||
40 | int xchk_da_btree_hash(struct xchk_da_btree *ds, int level, | 40 | int xchk_da_btree_hash(struct xchk_da_btree *ds, int level, |
41 | __be32 *hashp); | 41 | __be32 *hashp); |
42 | int xchk_da_btree(struct xfs_scrub_context *sc, int whichfork, | 42 | int xchk_da_btree(struct xfs_scrub *sc, int whichfork, |
43 | xchk_da_btree_rec_fn scrub_fn, void *private); | 43 | xchk_da_btree_rec_fn scrub_fn, void *private); |
44 | 44 | ||
45 | #endif /* __XFS_SCRUB_DABTREE_H__ */ | 45 | #endif /* __XFS_SCRUB_DABTREE_H__ */ |
diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c index 2ac07bb73478..194a3ef69a9f 100644 --- a/fs/xfs/scrub/dir.c +++ b/fs/xfs/scrub/dir.c | |||
@@ -32,7 +32,7 @@ | |||
32 | /* Set us up to scrub directories. */ | 32 | /* Set us up to scrub directories. */ |
33 | int | 33 | int |
34 | xchk_setup_directory( | 34 | xchk_setup_directory( |
35 | struct xfs_scrub_context *sc, | 35 | struct xfs_scrub *sc, |
36 | struct xfs_inode *ip) | 36 | struct xfs_inode *ip) |
37 | { | 37 | { |
38 | return xchk_setup_inode_contents(sc, ip, 0); | 38 | return xchk_setup_inode_contents(sc, ip, 0); |
@@ -46,7 +46,7 @@ struct xchk_dir_ctx { | |||
46 | /* VFS fill-directory iterator */ | 46 | /* VFS fill-directory iterator */ |
47 | struct dir_context dir_iter; | 47 | struct dir_context dir_iter; |
48 | 48 | ||
49 | struct xfs_scrub_context *sc; | 49 | struct xfs_scrub *sc; |
50 | }; | 50 | }; |
51 | 51 | ||
52 | /* Check that an inode's mode matches a given DT_ type. */ | 52 | /* Check that an inode's mode matches a given DT_ type. */ |
@@ -289,7 +289,7 @@ out: | |||
289 | */ | 289 | */ |
290 | STATIC void | 290 | STATIC void |
291 | xchk_directory_check_free_entry( | 291 | xchk_directory_check_free_entry( |
292 | struct xfs_scrub_context *sc, | 292 | struct xfs_scrub *sc, |
293 | xfs_dablk_t lblk, | 293 | xfs_dablk_t lblk, |
294 | struct xfs_dir2_data_free *bf, | 294 | struct xfs_dir2_data_free *bf, |
295 | struct xfs_dir2_data_unused *dup) | 295 | struct xfs_dir2_data_unused *dup) |
@@ -314,7 +314,7 @@ xchk_directory_check_free_entry( | |||
314 | /* Check free space info in a directory data block. */ | 314 | /* Check free space info in a directory data block. */ |
315 | STATIC int | 315 | STATIC int |
316 | xchk_directory_data_bestfree( | 316 | xchk_directory_data_bestfree( |
317 | struct xfs_scrub_context *sc, | 317 | struct xfs_scrub *sc, |
318 | xfs_dablk_t lblk, | 318 | xfs_dablk_t lblk, |
319 | bool is_block) | 319 | bool is_block) |
320 | { | 320 | { |
@@ -455,7 +455,7 @@ out: | |||
455 | */ | 455 | */ |
456 | STATIC void | 456 | STATIC void |
457 | xchk_directory_check_freesp( | 457 | xchk_directory_check_freesp( |
458 | struct xfs_scrub_context *sc, | 458 | struct xfs_scrub *sc, |
459 | xfs_dablk_t lblk, | 459 | xfs_dablk_t lblk, |
460 | struct xfs_buf *dbp, | 460 | struct xfs_buf *dbp, |
461 | unsigned int len) | 461 | unsigned int len) |
@@ -474,7 +474,7 @@ xchk_directory_check_freesp( | |||
474 | /* Check free space info in a directory leaf1 block. */ | 474 | /* Check free space info in a directory leaf1 block. */ |
475 | STATIC int | 475 | STATIC int |
476 | xchk_directory_leaf1_bestfree( | 476 | xchk_directory_leaf1_bestfree( |
477 | struct xfs_scrub_context *sc, | 477 | struct xfs_scrub *sc, |
478 | struct xfs_da_args *args, | 478 | struct xfs_da_args *args, |
479 | xfs_dablk_t lblk) | 479 | xfs_dablk_t lblk) |
480 | { | 480 | { |
@@ -572,7 +572,7 @@ out: | |||
572 | /* Check free space info in a directory freespace block. */ | 572 | /* Check free space info in a directory freespace block. */ |
573 | STATIC int | 573 | STATIC int |
574 | xchk_directory_free_bestfree( | 574 | xchk_directory_free_bestfree( |
575 | struct xfs_scrub_context *sc, | 575 | struct xfs_scrub *sc, |
576 | struct xfs_da_args *args, | 576 | struct xfs_da_args *args, |
577 | xfs_dablk_t lblk) | 577 | xfs_dablk_t lblk) |
578 | { | 578 | { |
@@ -626,7 +626,7 @@ out: | |||
626 | /* Check free space information in directories. */ | 626 | /* Check free space information in directories. */ |
627 | STATIC int | 627 | STATIC int |
628 | xchk_directory_blocks( | 628 | xchk_directory_blocks( |
629 | struct xfs_scrub_context *sc) | 629 | struct xfs_scrub *sc) |
630 | { | 630 | { |
631 | struct xfs_bmbt_irec got; | 631 | struct xfs_bmbt_irec got; |
632 | struct xfs_da_args args; | 632 | struct xfs_da_args args; |
@@ -770,7 +770,7 @@ out: | |||
770 | /* Scrub a whole directory. */ | 770 | /* Scrub a whole directory. */ |
771 | int | 771 | int |
772 | xchk_directory( | 772 | xchk_directory( |
773 | struct xfs_scrub_context *sc) | 773 | struct xfs_scrub *sc) |
774 | { | 774 | { |
775 | struct xchk_dir_ctx sdc = { | 775 | struct xchk_dir_ctx sdc = { |
776 | .dir_iter.actor = xchk_dir_actor, | 776 | .dir_iter.actor = xchk_dir_actor, |
diff --git a/fs/xfs/scrub/ialloc.c b/fs/xfs/scrub/ialloc.c index 69d652b7299c..6df8eba9f52b 100644 --- a/fs/xfs/scrub/ialloc.c +++ b/fs/xfs/scrub/ialloc.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | int | 37 | int |
38 | xchk_setup_ag_iallocbt( | 38 | xchk_setup_ag_iallocbt( |
39 | struct xfs_scrub_context *sc, | 39 | struct xfs_scrub *sc, |
40 | struct xfs_inode *ip) | 40 | struct xfs_inode *ip) |
41 | { | 41 | { |
42 | return xchk_setup_ag_btree(sc, ip, sc->try_harder); | 42 | return xchk_setup_ag_btree(sc, ip, sc->try_harder); |
@@ -51,7 +51,7 @@ xchk_setup_ag_iallocbt( | |||
51 | */ | 51 | */ |
52 | static inline void | 52 | static inline void |
53 | xchk_iallocbt_chunk_xref_other( | 53 | xchk_iallocbt_chunk_xref_other( |
54 | struct xfs_scrub_context *sc, | 54 | struct xfs_scrub *sc, |
55 | struct xfs_inobt_rec_incore *irec, | 55 | struct xfs_inobt_rec_incore *irec, |
56 | xfs_agino_t agino) | 56 | xfs_agino_t agino) |
57 | { | 57 | { |
@@ -76,7 +76,7 @@ xchk_iallocbt_chunk_xref_other( | |||
76 | /* Cross-reference with the other btrees. */ | 76 | /* Cross-reference with the other btrees. */ |
77 | STATIC void | 77 | STATIC void |
78 | xchk_iallocbt_chunk_xref( | 78 | xchk_iallocbt_chunk_xref( |
79 | struct xfs_scrub_context *sc, | 79 | struct xfs_scrub *sc, |
80 | struct xfs_inobt_rec_incore *irec, | 80 | struct xfs_inobt_rec_incore *irec, |
81 | xfs_agino_t agino, | 81 | xfs_agino_t agino, |
82 | xfs_agblock_t agbno, | 82 | xfs_agblock_t agbno, |
@@ -363,7 +363,7 @@ out: | |||
363 | */ | 363 | */ |
364 | STATIC void | 364 | STATIC void |
365 | xchk_iallocbt_xref_rmap_btreeblks( | 365 | xchk_iallocbt_xref_rmap_btreeblks( |
366 | struct xfs_scrub_context *sc, | 366 | struct xfs_scrub *sc, |
367 | int which) | 367 | int which) |
368 | { | 368 | { |
369 | struct xfs_owner_info oinfo; | 369 | struct xfs_owner_info oinfo; |
@@ -403,7 +403,7 @@ xchk_iallocbt_xref_rmap_btreeblks( | |||
403 | */ | 403 | */ |
404 | STATIC void | 404 | STATIC void |
405 | xchk_iallocbt_xref_rmap_inodes( | 405 | xchk_iallocbt_xref_rmap_inodes( |
406 | struct xfs_scrub_context *sc, | 406 | struct xfs_scrub *sc, |
407 | int which, | 407 | int which, |
408 | xfs_filblks_t inode_blocks) | 408 | xfs_filblks_t inode_blocks) |
409 | { | 409 | { |
@@ -427,7 +427,7 @@ xchk_iallocbt_xref_rmap_inodes( | |||
427 | /* Scrub the inode btrees for some AG. */ | 427 | /* Scrub the inode btrees for some AG. */ |
428 | STATIC int | 428 | STATIC int |
429 | xchk_iallocbt( | 429 | xchk_iallocbt( |
430 | struct xfs_scrub_context *sc, | 430 | struct xfs_scrub *sc, |
431 | xfs_btnum_t which) | 431 | xfs_btnum_t which) |
432 | { | 432 | { |
433 | struct xfs_btree_cur *cur; | 433 | struct xfs_btree_cur *cur; |
@@ -459,14 +459,14 @@ xchk_iallocbt( | |||
459 | 459 | ||
460 | int | 460 | int |
461 | xchk_inobt( | 461 | xchk_inobt( |
462 | struct xfs_scrub_context *sc) | 462 | struct xfs_scrub *sc) |
463 | { | 463 | { |
464 | return xchk_iallocbt(sc, XFS_BTNUM_INO); | 464 | return xchk_iallocbt(sc, XFS_BTNUM_INO); |
465 | } | 465 | } |
466 | 466 | ||
467 | int | 467 | int |
468 | xchk_finobt( | 468 | xchk_finobt( |
469 | struct xfs_scrub_context *sc) | 469 | struct xfs_scrub *sc) |
470 | { | 470 | { |
471 | return xchk_iallocbt(sc, XFS_BTNUM_FINO); | 471 | return xchk_iallocbt(sc, XFS_BTNUM_FINO); |
472 | } | 472 | } |
@@ -474,7 +474,7 @@ xchk_finobt( | |||
474 | /* See if an inode btree has (or doesn't have) an inode chunk record. */ | 474 | /* See if an inode btree has (or doesn't have) an inode chunk record. */ |
475 | static inline void | 475 | static inline void |
476 | xchk_xref_inode_check( | 476 | xchk_xref_inode_check( |
477 | struct xfs_scrub_context *sc, | 477 | struct xfs_scrub *sc, |
478 | xfs_agblock_t agbno, | 478 | xfs_agblock_t agbno, |
479 | xfs_extlen_t len, | 479 | xfs_extlen_t len, |
480 | struct xfs_btree_cur **icur, | 480 | struct xfs_btree_cur **icur, |
@@ -496,7 +496,7 @@ xchk_xref_inode_check( | |||
496 | /* xref check that the extent is not covered by inodes */ | 496 | /* xref check that the extent is not covered by inodes */ |
497 | void | 497 | void |
498 | xchk_xref_is_not_inode_chunk( | 498 | xchk_xref_is_not_inode_chunk( |
499 | struct xfs_scrub_context *sc, | 499 | struct xfs_scrub *sc, |
500 | xfs_agblock_t agbno, | 500 | xfs_agblock_t agbno, |
501 | xfs_extlen_t len) | 501 | xfs_extlen_t len) |
502 | { | 502 | { |
@@ -507,7 +507,7 @@ xchk_xref_is_not_inode_chunk( | |||
507 | /* xref check that the extent is covered by inodes */ | 507 | /* xref check that the extent is covered by inodes */ |
508 | void | 508 | void |
509 | xchk_xref_is_inode_chunk( | 509 | xchk_xref_is_inode_chunk( |
510 | struct xfs_scrub_context *sc, | 510 | struct xfs_scrub *sc, |
511 | xfs_agblock_t agbno, | 511 | xfs_agblock_t agbno, |
512 | xfs_extlen_t len) | 512 | xfs_extlen_t len) |
513 | { | 513 | { |
diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c index d85fbec39e52..6cc027983c13 100644 --- a/fs/xfs/scrub/inode.c +++ b/fs/xfs/scrub/inode.c | |||
@@ -38,7 +38,7 @@ | |||
38 | */ | 38 | */ |
39 | int | 39 | int |
40 | xchk_setup_inode( | 40 | xchk_setup_inode( |
41 | struct xfs_scrub_context *sc, | 41 | struct xfs_scrub *sc, |
42 | struct xfs_inode *ip) | 42 | struct xfs_inode *ip) |
43 | { | 43 | { |
44 | int error; | 44 | int error; |
@@ -77,7 +77,7 @@ out: | |||
77 | /* Validate di_extsize hint. */ | 77 | /* Validate di_extsize hint. */ |
78 | STATIC void | 78 | STATIC void |
79 | xchk_inode_extsize( | 79 | xchk_inode_extsize( |
80 | struct xfs_scrub_context *sc, | 80 | struct xfs_scrub *sc, |
81 | struct xfs_dinode *dip, | 81 | struct xfs_dinode *dip, |
82 | xfs_ino_t ino, | 82 | xfs_ino_t ino, |
83 | uint16_t mode, | 83 | uint16_t mode, |
@@ -99,7 +99,7 @@ xchk_inode_extsize( | |||
99 | */ | 99 | */ |
100 | STATIC void | 100 | STATIC void |
101 | xchk_inode_cowextsize( | 101 | xchk_inode_cowextsize( |
102 | struct xfs_scrub_context *sc, | 102 | struct xfs_scrub *sc, |
103 | struct xfs_dinode *dip, | 103 | struct xfs_dinode *dip, |
104 | xfs_ino_t ino, | 104 | xfs_ino_t ino, |
105 | uint16_t mode, | 105 | uint16_t mode, |
@@ -118,7 +118,7 @@ xchk_inode_cowextsize( | |||
118 | /* Make sure the di_flags make sense for the inode. */ | 118 | /* Make sure the di_flags make sense for the inode. */ |
119 | STATIC void | 119 | STATIC void |
120 | xchk_inode_flags( | 120 | xchk_inode_flags( |
121 | struct xfs_scrub_context *sc, | 121 | struct xfs_scrub *sc, |
122 | struct xfs_dinode *dip, | 122 | struct xfs_dinode *dip, |
123 | xfs_ino_t ino, | 123 | xfs_ino_t ino, |
124 | uint16_t mode, | 124 | uint16_t mode, |
@@ -163,7 +163,7 @@ bad: | |||
163 | /* Make sure the di_flags2 make sense for the inode. */ | 163 | /* Make sure the di_flags2 make sense for the inode. */ |
164 | STATIC void | 164 | STATIC void |
165 | xchk_inode_flags2( | 165 | xchk_inode_flags2( |
166 | struct xfs_scrub_context *sc, | 166 | struct xfs_scrub *sc, |
167 | struct xfs_dinode *dip, | 167 | struct xfs_dinode *dip, |
168 | xfs_ino_t ino, | 168 | xfs_ino_t ino, |
169 | uint16_t mode, | 169 | uint16_t mode, |
@@ -206,7 +206,7 @@ bad: | |||
206 | /* Scrub all the ondisk inode fields. */ | 206 | /* Scrub all the ondisk inode fields. */ |
207 | STATIC void | 207 | STATIC void |
208 | xchk_dinode( | 208 | xchk_dinode( |
209 | struct xfs_scrub_context *sc, | 209 | struct xfs_scrub *sc, |
210 | struct xfs_dinode *dip, | 210 | struct xfs_dinode *dip, |
211 | xfs_ino_t ino) | 211 | xfs_ino_t ino) |
212 | { | 212 | { |
@@ -426,7 +426,7 @@ xchk_dinode( | |||
426 | */ | 426 | */ |
427 | static void | 427 | static void |
428 | xchk_inode_xref_finobt( | 428 | xchk_inode_xref_finobt( |
429 | struct xfs_scrub_context *sc, | 429 | struct xfs_scrub *sc, |
430 | xfs_ino_t ino) | 430 | xfs_ino_t ino) |
431 | { | 431 | { |
432 | struct xfs_inobt_rec_incore rec; | 432 | struct xfs_inobt_rec_incore rec; |
@@ -469,7 +469,7 @@ xchk_inode_xref_finobt( | |||
469 | /* Cross reference the inode fields with the forks. */ | 469 | /* Cross reference the inode fields with the forks. */ |
470 | STATIC void | 470 | STATIC void |
471 | xchk_inode_xref_bmap( | 471 | xchk_inode_xref_bmap( |
472 | struct xfs_scrub_context *sc, | 472 | struct xfs_scrub *sc, |
473 | struct xfs_dinode *dip) | 473 | struct xfs_dinode *dip) |
474 | { | 474 | { |
475 | xfs_extnum_t nextents; | 475 | xfs_extnum_t nextents; |
@@ -503,7 +503,7 @@ xchk_inode_xref_bmap( | |||
503 | /* Cross-reference with the other btrees. */ | 503 | /* Cross-reference with the other btrees. */ |
504 | STATIC void | 504 | STATIC void |
505 | xchk_inode_xref( | 505 | xchk_inode_xref( |
506 | struct xfs_scrub_context *sc, | 506 | struct xfs_scrub *sc, |
507 | xfs_ino_t ino, | 507 | xfs_ino_t ino, |
508 | struct xfs_dinode *dip) | 508 | struct xfs_dinode *dip) |
509 | { | 509 | { |
@@ -540,7 +540,7 @@ xchk_inode_xref( | |||
540 | */ | 540 | */ |
541 | static void | 541 | static void |
542 | xchk_inode_check_reflink_iflag( | 542 | xchk_inode_check_reflink_iflag( |
543 | struct xfs_scrub_context *sc, | 543 | struct xfs_scrub *sc, |
544 | xfs_ino_t ino) | 544 | xfs_ino_t ino) |
545 | { | 545 | { |
546 | struct xfs_mount *mp = sc->mp; | 546 | struct xfs_mount *mp = sc->mp; |
@@ -564,7 +564,7 @@ xchk_inode_check_reflink_iflag( | |||
564 | /* Scrub an inode. */ | 564 | /* Scrub an inode. */ |
565 | int | 565 | int |
566 | xchk_inode( | 566 | xchk_inode( |
567 | struct xfs_scrub_context *sc) | 567 | struct xfs_scrub *sc) |
568 | { | 568 | { |
569 | struct xfs_dinode di; | 569 | struct xfs_dinode di; |
570 | int error = 0; | 570 | int error = 0; |
diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c index 0a78d8411f23..808459ad0c35 100644 --- a/fs/xfs/scrub/parent.c +++ b/fs/xfs/scrub/parent.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /* Set us up to scrub parents. */ | 28 | /* Set us up to scrub parents. */ |
29 | int | 29 | int |
30 | xchk_setup_parent( | 30 | xchk_setup_parent( |
31 | struct xfs_scrub_context *sc, | 31 | struct xfs_scrub *sc, |
32 | struct xfs_inode *ip) | 32 | struct xfs_inode *ip) |
33 | { | 33 | { |
34 | return xchk_setup_inode_contents(sc, ip, 0); | 34 | return xchk_setup_inode_contents(sc, ip, 0); |
@@ -65,7 +65,7 @@ xchk_parent_actor( | |||
65 | /* Count the number of dentries in the parent dir that point to this inode. */ | 65 | /* Count the number of dentries in the parent dir that point to this inode. */ |
66 | STATIC int | 66 | STATIC int |
67 | xchk_parent_count_parent_dentries( | 67 | xchk_parent_count_parent_dentries( |
68 | struct xfs_scrub_context *sc, | 68 | struct xfs_scrub *sc, |
69 | struct xfs_inode *parent, | 69 | struct xfs_inode *parent, |
70 | xfs_nlink_t *nlink) | 70 | xfs_nlink_t *nlink) |
71 | { | 71 | { |
@@ -121,7 +121,7 @@ out: | |||
121 | */ | 121 | */ |
122 | STATIC int | 122 | STATIC int |
123 | xchk_parent_validate( | 123 | xchk_parent_validate( |
124 | struct xfs_scrub_context *sc, | 124 | struct xfs_scrub *sc, |
125 | xfs_ino_t dnum, | 125 | xfs_ino_t dnum, |
126 | bool *try_again) | 126 | bool *try_again) |
127 | { | 127 | { |
@@ -255,7 +255,7 @@ out: | |||
255 | /* Scrub a parent pointer. */ | 255 | /* Scrub a parent pointer. */ |
256 | int | 256 | int |
257 | xchk_parent( | 257 | xchk_parent( |
258 | struct xfs_scrub_context *sc) | 258 | struct xfs_scrub *sc) |
259 | { | 259 | { |
260 | struct xfs_mount *mp = sc->mp; | 260 | struct xfs_mount *mp = sc->mp; |
261 | xfs_ino_t dnum; | 261 | xfs_ino_t dnum; |
diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c index d1b52dd7efcd..309ebeecfa5d 100644 --- a/fs/xfs/scrub/quota.c +++ b/fs/xfs/scrub/quota.c | |||
@@ -31,7 +31,7 @@ | |||
31 | /* Convert a scrub type code to a DQ flag, or return 0 if error. */ | 31 | /* Convert a scrub type code to a DQ flag, or return 0 if error. */ |
32 | static inline uint | 32 | static inline uint |
33 | xchk_quota_to_dqtype( | 33 | xchk_quota_to_dqtype( |
34 | struct xfs_scrub_context *sc) | 34 | struct xfs_scrub *sc) |
35 | { | 35 | { |
36 | switch (sc->sm->sm_type) { | 36 | switch (sc->sm->sm_type) { |
37 | case XFS_SCRUB_TYPE_UQUOTA: | 37 | case XFS_SCRUB_TYPE_UQUOTA: |
@@ -48,7 +48,7 @@ xchk_quota_to_dqtype( | |||
48 | /* Set us up to scrub a quota. */ | 48 | /* Set us up to scrub a quota. */ |
49 | int | 49 | int |
50 | xchk_setup_quota( | 50 | xchk_setup_quota( |
51 | struct xfs_scrub_context *sc, | 51 | struct xfs_scrub *sc, |
52 | struct xfs_inode *ip) | 52 | struct xfs_inode *ip) |
53 | { | 53 | { |
54 | uint dqtype; | 54 | uint dqtype; |
@@ -76,7 +76,7 @@ xchk_setup_quota( | |||
76 | /* Quotas. */ | 76 | /* Quotas. */ |
77 | 77 | ||
78 | struct xchk_quota_info { | 78 | struct xchk_quota_info { |
79 | struct xfs_scrub_context *sc; | 79 | struct xfs_scrub *sc; |
80 | xfs_dqid_t last_id; | 80 | xfs_dqid_t last_id; |
81 | }; | 81 | }; |
82 | 82 | ||
@@ -88,7 +88,7 @@ xchk_quota_item( | |||
88 | void *priv) | 88 | void *priv) |
89 | { | 89 | { |
90 | struct xchk_quota_info *sqi = priv; | 90 | struct xchk_quota_info *sqi = priv; |
91 | struct xfs_scrub_context *sc = sqi->sc; | 91 | struct xfs_scrub *sc = sqi->sc; |
92 | struct xfs_mount *mp = sc->mp; | 92 | struct xfs_mount *mp = sc->mp; |
93 | struct xfs_disk_dquot *d = &dq->q_core; | 93 | struct xfs_disk_dquot *d = &dq->q_core; |
94 | struct xfs_quotainfo *qi = mp->m_quotainfo; | 94 | struct xfs_quotainfo *qi = mp->m_quotainfo; |
@@ -195,7 +195,7 @@ xchk_quota_item( | |||
195 | /* Check the quota's data fork. */ | 195 | /* Check the quota's data fork. */ |
196 | STATIC int | 196 | STATIC int |
197 | xchk_quota_data_fork( | 197 | xchk_quota_data_fork( |
198 | struct xfs_scrub_context *sc) | 198 | struct xfs_scrub *sc) |
199 | { | 199 | { |
200 | struct xfs_bmbt_irec irec = { 0 }; | 200 | struct xfs_bmbt_irec irec = { 0 }; |
201 | struct xfs_iext_cursor icur; | 201 | struct xfs_iext_cursor icur; |
@@ -234,7 +234,7 @@ xchk_quota_data_fork( | |||
234 | /* Scrub all of a quota type's items. */ | 234 | /* Scrub all of a quota type's items. */ |
235 | int | 235 | int |
236 | xchk_quota( | 236 | xchk_quota( |
237 | struct xfs_scrub_context *sc) | 237 | struct xfs_scrub *sc) |
238 | { | 238 | { |
239 | struct xchk_quota_info sqi; | 239 | struct xchk_quota_info sqi; |
240 | struct xfs_mount *mp = sc->mp; | 240 | struct xfs_mount *mp = sc->mp; |
diff --git a/fs/xfs/scrub/refcount.c b/fs/xfs/scrub/refcount.c index 274febc49b23..c1162d408987 100644 --- a/fs/xfs/scrub/refcount.c +++ b/fs/xfs/scrub/refcount.c | |||
@@ -29,7 +29,7 @@ | |||
29 | */ | 29 | */ |
30 | int | 30 | int |
31 | xchk_setup_ag_refcountbt( | 31 | xchk_setup_ag_refcountbt( |
32 | struct xfs_scrub_context *sc, | 32 | struct xfs_scrub *sc, |
33 | struct xfs_inode *ip) | 33 | struct xfs_inode *ip) |
34 | { | 34 | { |
35 | return xchk_setup_ag_btree(sc, ip, false); | 35 | return xchk_setup_ag_btree(sc, ip, false); |
@@ -79,7 +79,7 @@ struct xchk_refcnt_frag { | |||
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct xchk_refcnt_check { | 81 | struct xchk_refcnt_check { |
82 | struct xfs_scrub_context *sc; | 82 | struct xfs_scrub *sc; |
83 | struct list_head fragments; | 83 | struct list_head fragments; |
84 | 84 | ||
85 | /* refcount extent we're examining */ | 85 | /* refcount extent we're examining */ |
@@ -278,7 +278,7 @@ done: | |||
278 | /* Use the rmap entries covering this extent to verify the refcount. */ | 278 | /* Use the rmap entries covering this extent to verify the refcount. */ |
279 | STATIC void | 279 | STATIC void |
280 | xchk_refcountbt_xref_rmap( | 280 | xchk_refcountbt_xref_rmap( |
281 | struct xfs_scrub_context *sc, | 281 | struct xfs_scrub *sc, |
282 | xfs_agblock_t bno, | 282 | xfs_agblock_t bno, |
283 | xfs_extlen_t len, | 283 | xfs_extlen_t len, |
284 | xfs_nlink_t refcount) | 284 | xfs_nlink_t refcount) |
@@ -325,7 +325,7 @@ out_free: | |||
325 | /* Cross-reference with the other btrees. */ | 325 | /* Cross-reference with the other btrees. */ |
326 | STATIC void | 326 | STATIC void |
327 | xchk_refcountbt_xref( | 327 | xchk_refcountbt_xref( |
328 | struct xfs_scrub_context *sc, | 328 | struct xfs_scrub *sc, |
329 | xfs_agblock_t agbno, | 329 | xfs_agblock_t agbno, |
330 | xfs_extlen_t len, | 330 | xfs_extlen_t len, |
331 | xfs_nlink_t refcount) | 331 | xfs_nlink_t refcount) |
@@ -382,7 +382,7 @@ xchk_refcountbt_rec( | |||
382 | /* Make sure we have as many refc blocks as the rmap says. */ | 382 | /* Make sure we have as many refc blocks as the rmap says. */ |
383 | STATIC void | 383 | STATIC void |
384 | xchk_refcount_xref_rmap( | 384 | xchk_refcount_xref_rmap( |
385 | struct xfs_scrub_context *sc, | 385 | struct xfs_scrub *sc, |
386 | struct xfs_owner_info *oinfo, | 386 | struct xfs_owner_info *oinfo, |
387 | xfs_filblks_t cow_blocks) | 387 | xfs_filblks_t cow_blocks) |
388 | { | 388 | { |
@@ -417,7 +417,7 @@ xchk_refcount_xref_rmap( | |||
417 | /* Scrub the refcount btree for some AG. */ | 417 | /* Scrub the refcount btree for some AG. */ |
418 | int | 418 | int |
419 | xchk_refcountbt( | 419 | xchk_refcountbt( |
420 | struct xfs_scrub_context *sc) | 420 | struct xfs_scrub *sc) |
421 | { | 421 | { |
422 | struct xfs_owner_info oinfo; | 422 | struct xfs_owner_info oinfo; |
423 | xfs_agblock_t cow_blocks = 0; | 423 | xfs_agblock_t cow_blocks = 0; |
@@ -437,7 +437,7 @@ xchk_refcountbt( | |||
437 | /* xref check that a cow staging extent is marked in the refcountbt. */ | 437 | /* xref check that a cow staging extent is marked in the refcountbt. */ |
438 | void | 438 | void |
439 | xchk_xref_is_cow_staging( | 439 | xchk_xref_is_cow_staging( |
440 | struct xfs_scrub_context *sc, | 440 | struct xfs_scrub *sc, |
441 | xfs_agblock_t agbno, | 441 | xfs_agblock_t agbno, |
442 | xfs_extlen_t len) | 442 | xfs_extlen_t len) |
443 | { | 443 | { |
@@ -483,7 +483,7 @@ xchk_xref_is_cow_staging( | |||
483 | */ | 483 | */ |
484 | void | 484 | void |
485 | xchk_xref_is_not_shared( | 485 | xchk_xref_is_not_shared( |
486 | struct xfs_scrub_context *sc, | 486 | struct xfs_scrub *sc, |
487 | xfs_agblock_t agbno, | 487 | xfs_agblock_t agbno, |
488 | xfs_extlen_t len) | 488 | xfs_extlen_t len) |
489 | { | 489 | { |
diff --git a/fs/xfs/scrub/repair.c b/fs/xfs/scrub/repair.c index 7e6a56a5f59d..29debd5649ac 100644 --- a/fs/xfs/scrub/repair.c +++ b/fs/xfs/scrub/repair.c | |||
@@ -43,7 +43,7 @@ | |||
43 | int | 43 | int |
44 | xrep_attempt( | 44 | xrep_attempt( |
45 | struct xfs_inode *ip, | 45 | struct xfs_inode *ip, |
46 | struct xfs_scrub_context *sc, | 46 | struct xfs_scrub *sc, |
47 | bool *fixed) | 47 | bool *fixed) |
48 | { | 48 | { |
49 | int error = 0; | 49 | int error = 0; |
@@ -106,7 +106,7 @@ xrep_failure( | |||
106 | */ | 106 | */ |
107 | int | 107 | int |
108 | xrep_probe( | 108 | xrep_probe( |
109 | struct xfs_scrub_context *sc) | 109 | struct xfs_scrub *sc) |
110 | { | 110 | { |
111 | int error = 0; | 111 | int error = 0; |
112 | 112 | ||
@@ -122,7 +122,7 @@ xrep_probe( | |||
122 | */ | 122 | */ |
123 | int | 123 | int |
124 | xrep_roll_ag_trans( | 124 | xrep_roll_ag_trans( |
125 | struct xfs_scrub_context *sc) | 125 | struct xfs_scrub *sc) |
126 | { | 126 | { |
127 | int error; | 127 | int error; |
128 | 128 | ||
@@ -179,7 +179,7 @@ xrep_ag_has_space( | |||
179 | */ | 179 | */ |
180 | xfs_extlen_t | 180 | xfs_extlen_t |
181 | xrep_calc_ag_resblks( | 181 | xrep_calc_ag_resblks( |
182 | struct xfs_scrub_context *sc) | 182 | struct xfs_scrub *sc) |
183 | { | 183 | { |
184 | struct xfs_mount *mp = sc->mp; | 184 | struct xfs_mount *mp = sc->mp; |
185 | struct xfs_scrub_metadata *sm = sc->sm; | 185 | struct xfs_scrub_metadata *sm = sc->sm; |
@@ -279,7 +279,7 @@ xrep_calc_ag_resblks( | |||
279 | /* Allocate a block in an AG. */ | 279 | /* Allocate a block in an AG. */ |
280 | int | 280 | int |
281 | xrep_alloc_ag_block( | 281 | xrep_alloc_ag_block( |
282 | struct xfs_scrub_context *sc, | 282 | struct xfs_scrub *sc, |
283 | struct xfs_owner_info *oinfo, | 283 | struct xfs_owner_info *oinfo, |
284 | xfs_fsblock_t *fsbno, | 284 | xfs_fsblock_t *fsbno, |
285 | enum xfs_ag_resv_type resv) | 285 | enum xfs_ag_resv_type resv) |
@@ -330,7 +330,7 @@ xrep_alloc_ag_block( | |||
330 | /* Initialize a new AG btree root block with zero entries. */ | 330 | /* Initialize a new AG btree root block with zero entries. */ |
331 | int | 331 | int |
332 | xrep_init_btblock( | 332 | xrep_init_btblock( |
333 | struct xfs_scrub_context *sc, | 333 | struct xfs_scrub *sc, |
334 | xfs_fsblock_t fsb, | 334 | xfs_fsblock_t fsb, |
335 | struct xfs_buf **bpp, | 335 | struct xfs_buf **bpp, |
336 | xfs_btnum_t btnum, | 336 | xfs_btnum_t btnum, |
@@ -385,7 +385,7 @@ xrep_init_btblock( | |||
385 | /* Collect a dead btree extent for later disposal. */ | 385 | /* Collect a dead btree extent for later disposal. */ |
386 | int | 386 | int |
387 | xrep_collect_btree_extent( | 387 | xrep_collect_btree_extent( |
388 | struct xfs_scrub_context *sc, | 388 | struct xfs_scrub *sc, |
389 | struct xrep_extent_list *exlist, | 389 | struct xrep_extent_list *exlist, |
390 | xfs_fsblock_t fsbno, | 390 | xfs_fsblock_t fsbno, |
391 | xfs_extlen_t len) | 391 | xfs_extlen_t len) |
@@ -415,7 +415,7 @@ xrep_collect_btree_extent( | |||
415 | */ | 415 | */ |
416 | void | 416 | void |
417 | xrep_cancel_btree_extents( | 417 | xrep_cancel_btree_extents( |
418 | struct xfs_scrub_context *sc, | 418 | struct xfs_scrub *sc, |
419 | struct xrep_extent_list *exlist) | 419 | struct xrep_extent_list *exlist) |
420 | { | 420 | { |
421 | struct xrep_extent *rex; | 421 | struct xrep_extent *rex; |
@@ -463,7 +463,7 @@ xrep_btree_extent_cmp( | |||
463 | #define RIGHT_ALIGNED (1 << 1) | 463 | #define RIGHT_ALIGNED (1 << 1) |
464 | int | 464 | int |
465 | xrep_subtract_extents( | 465 | xrep_subtract_extents( |
466 | struct xfs_scrub_context *sc, | 466 | struct xfs_scrub *sc, |
467 | struct xrep_extent_list *exlist, | 467 | struct xrep_extent_list *exlist, |
468 | struct xrep_extent_list *sublist) | 468 | struct xrep_extent_list *sublist) |
469 | { | 469 | { |
@@ -620,7 +620,7 @@ out: | |||
620 | */ | 620 | */ |
621 | int | 621 | int |
622 | xrep_invalidate_blocks( | 622 | xrep_invalidate_blocks( |
623 | struct xfs_scrub_context *sc, | 623 | struct xfs_scrub *sc, |
624 | struct xrep_extent_list *exlist) | 624 | struct xrep_extent_list *exlist) |
625 | { | 625 | { |
626 | struct xrep_extent *rex; | 626 | struct xrep_extent *rex; |
@@ -658,7 +658,7 @@ xrep_invalidate_blocks( | |||
658 | /* Ensure the freelist is the correct size. */ | 658 | /* Ensure the freelist is the correct size. */ |
659 | int | 659 | int |
660 | xrep_fix_freelist( | 660 | xrep_fix_freelist( |
661 | struct xfs_scrub_context *sc, | 661 | struct xfs_scrub *sc, |
662 | bool can_shrink) | 662 | bool can_shrink) |
663 | { | 663 | { |
664 | struct xfs_alloc_arg args = {0}; | 664 | struct xfs_alloc_arg args = {0}; |
@@ -678,7 +678,7 @@ xrep_fix_freelist( | |||
678 | */ | 678 | */ |
679 | STATIC int | 679 | STATIC int |
680 | xrep_put_freelist( | 680 | xrep_put_freelist( |
681 | struct xfs_scrub_context *sc, | 681 | struct xfs_scrub *sc, |
682 | xfs_agblock_t agbno) | 682 | xfs_agblock_t agbno) |
683 | { | 683 | { |
684 | struct xfs_owner_info oinfo; | 684 | struct xfs_owner_info oinfo; |
@@ -714,7 +714,7 @@ xrep_put_freelist( | |||
714 | /* Dispose of a single metadata block. */ | 714 | /* Dispose of a single metadata block. */ |
715 | STATIC int | 715 | STATIC int |
716 | xrep_dispose_btree_block( | 716 | xrep_dispose_btree_block( |
717 | struct xfs_scrub_context *sc, | 717 | struct xfs_scrub *sc, |
718 | xfs_fsblock_t fsbno, | 718 | xfs_fsblock_t fsbno, |
719 | struct xfs_owner_info *oinfo, | 719 | struct xfs_owner_info *oinfo, |
720 | enum xfs_ag_resv_type resv) | 720 | enum xfs_ag_resv_type resv) |
@@ -788,7 +788,7 @@ out_free: | |||
788 | /* Dispose of btree blocks from an old per-AG btree. */ | 788 | /* Dispose of btree blocks from an old per-AG btree. */ |
789 | int | 789 | int |
790 | xrep_reap_btree_extents( | 790 | xrep_reap_btree_extents( |
791 | struct xfs_scrub_context *sc, | 791 | struct xfs_scrub *sc, |
792 | struct xrep_extent_list *exlist, | 792 | struct xrep_extent_list *exlist, |
793 | struct xfs_owner_info *oinfo, | 793 | struct xfs_owner_info *oinfo, |
794 | enum xfs_ag_resv_type type) | 794 | enum xfs_ag_resv_type type) |
@@ -851,7 +851,7 @@ out: | |||
851 | */ | 851 | */ |
852 | 852 | ||
853 | struct xrep_findroot { | 853 | struct xrep_findroot { |
854 | struct xfs_scrub_context *sc; | 854 | struct xfs_scrub *sc; |
855 | struct xfs_buf *agfl_bp; | 855 | struct xfs_buf *agfl_bp; |
856 | struct xfs_agf *agf; | 856 | struct xfs_agf *agf; |
857 | struct xrep_find_ag_btree *btree_info; | 857 | struct xrep_find_ag_btree *btree_info; |
@@ -981,7 +981,7 @@ xrep_findroot_rmap( | |||
981 | /* Find the roots of the per-AG btrees described in btree_info. */ | 981 | /* Find the roots of the per-AG btrees described in btree_info. */ |
982 | int | 982 | int |
983 | xrep_find_ag_btree_roots( | 983 | xrep_find_ag_btree_roots( |
984 | struct xfs_scrub_context *sc, | 984 | struct xfs_scrub *sc, |
985 | struct xfs_buf *agf_bp, | 985 | struct xfs_buf *agf_bp, |
986 | struct xrep_find_ag_btree *btree_info, | 986 | struct xrep_find_ag_btree *btree_info, |
987 | struct xfs_buf *agfl_bp) | 987 | struct xfs_buf *agfl_bp) |
@@ -1016,7 +1016,7 @@ xrep_find_ag_btree_roots( | |||
1016 | /* Force a quotacheck the next time we mount. */ | 1016 | /* Force a quotacheck the next time we mount. */ |
1017 | void | 1017 | void |
1018 | xrep_force_quotacheck( | 1018 | xrep_force_quotacheck( |
1019 | struct xfs_scrub_context *sc, | 1019 | struct xfs_scrub *sc, |
1020 | uint dqtype) | 1020 | uint dqtype) |
1021 | { | 1021 | { |
1022 | uint flag; | 1022 | uint flag; |
@@ -1044,7 +1044,7 @@ xrep_force_quotacheck( | |||
1044 | */ | 1044 | */ |
1045 | int | 1045 | int |
1046 | xrep_ino_dqattach( | 1046 | xrep_ino_dqattach( |
1047 | struct xfs_scrub_context *sc) | 1047 | struct xfs_scrub *sc) |
1048 | { | 1048 | { |
1049 | int error; | 1049 | int error; |
1050 | 1050 | ||
diff --git a/fs/xfs/scrub/repair.h b/fs/xfs/scrub/repair.h index 60d81294797b..677f4b73b5ec 100644 --- a/fs/xfs/scrub/repair.h +++ b/fs/xfs/scrub/repair.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __XFS_SCRUB_REPAIR_H__ | 6 | #ifndef __XFS_SCRUB_REPAIR_H__ |
7 | #define __XFS_SCRUB_REPAIR_H__ | 7 | #define __XFS_SCRUB_REPAIR_H__ |
8 | 8 | ||
9 | static inline int xrep_notsupported(struct xfs_scrub_context *sc) | 9 | static inline int xrep_notsupported(struct xfs_scrub *sc) |
10 | { | 10 | { |
11 | return -EOPNOTSUPP; | 11 | return -EOPNOTSUPP; |
12 | } | 12 | } |
@@ -15,17 +15,17 @@ static inline int xrep_notsupported(struct xfs_scrub_context *sc) | |||
15 | 15 | ||
16 | /* Repair helpers */ | 16 | /* Repair helpers */ |
17 | 17 | ||
18 | int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub_context *sc, | 18 | int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub *sc, |
19 | bool *fixed); | 19 | bool *fixed); |
20 | void xrep_failure(struct xfs_mount *mp); | 20 | void xrep_failure(struct xfs_mount *mp); |
21 | int xrep_roll_ag_trans(struct xfs_scrub_context *sc); | 21 | int xrep_roll_ag_trans(struct xfs_scrub *sc); |
22 | bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks, | 22 | bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks, |
23 | enum xfs_ag_resv_type type); | 23 | enum xfs_ag_resv_type type); |
24 | xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub_context *sc); | 24 | xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub *sc); |
25 | int xrep_alloc_ag_block(struct xfs_scrub_context *sc, | 25 | int xrep_alloc_ag_block(struct xfs_scrub *sc, |
26 | struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno, | 26 | struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno, |
27 | enum xfs_ag_resv_type resv); | 27 | enum xfs_ag_resv_type resv); |
28 | int xrep_init_btblock(struct xfs_scrub_context *sc, xfs_fsblock_t fsb, | 28 | int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb, |
29 | struct xfs_buf **bpp, xfs_btnum_t btnum, | 29 | struct xfs_buf **bpp, xfs_btnum_t btnum, |
30 | const struct xfs_buf_ops *ops); | 30 | const struct xfs_buf_ops *ops); |
31 | 31 | ||
@@ -48,18 +48,18 @@ xrep_init_extent_list( | |||
48 | 48 | ||
49 | #define for_each_xrep_extent_safe(rbe, n, exlist) \ | 49 | #define for_each_xrep_extent_safe(rbe, n, exlist) \ |
50 | list_for_each_entry_safe((rbe), (n), &(exlist)->list, list) | 50 | list_for_each_entry_safe((rbe), (n), &(exlist)->list, list) |
51 | int xrep_collect_btree_extent(struct xfs_scrub_context *sc, | 51 | int xrep_collect_btree_extent(struct xfs_scrub *sc, |
52 | struct xrep_extent_list *btlist, xfs_fsblock_t fsbno, | 52 | struct xrep_extent_list *btlist, xfs_fsblock_t fsbno, |
53 | xfs_extlen_t len); | 53 | xfs_extlen_t len); |
54 | void xrep_cancel_btree_extents(struct xfs_scrub_context *sc, | 54 | void xrep_cancel_btree_extents(struct xfs_scrub *sc, |
55 | struct xrep_extent_list *btlist); | 55 | struct xrep_extent_list *btlist); |
56 | int xrep_subtract_extents(struct xfs_scrub_context *sc, | 56 | int xrep_subtract_extents(struct xfs_scrub *sc, |
57 | struct xrep_extent_list *exlist, | 57 | struct xrep_extent_list *exlist, |
58 | struct xrep_extent_list *sublist); | 58 | struct xrep_extent_list *sublist); |
59 | int xrep_fix_freelist(struct xfs_scrub_context *sc, bool can_shrink); | 59 | int xrep_fix_freelist(struct xfs_scrub *sc, bool can_shrink); |
60 | int xrep_invalidate_blocks(struct xfs_scrub_context *sc, | 60 | int xrep_invalidate_blocks(struct xfs_scrub *sc, |
61 | struct xrep_extent_list *btlist); | 61 | struct xrep_extent_list *btlist); |
62 | int xrep_reap_btree_extents(struct xfs_scrub_context *sc, | 62 | int xrep_reap_btree_extents(struct xfs_scrub *sc, |
63 | struct xrep_extent_list *exlist, | 63 | struct xrep_extent_list *exlist, |
64 | struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type); | 64 | struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type); |
65 | 65 | ||
@@ -78,23 +78,23 @@ struct xrep_find_ag_btree { | |||
78 | unsigned int height; | 78 | unsigned int height; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | int xrep_find_ag_btree_roots(struct xfs_scrub_context *sc, | 81 | int xrep_find_ag_btree_roots(struct xfs_scrub *sc, |
82 | struct xfs_buf *agf_bp, | 82 | struct xfs_buf *agf_bp, |
83 | struct xrep_find_ag_btree *btree_info, | 83 | struct xrep_find_ag_btree *btree_info, |
84 | struct xfs_buf *agfl_bp); | 84 | struct xfs_buf *agfl_bp); |
85 | void xrep_force_quotacheck(struct xfs_scrub_context *sc, uint dqtype); | 85 | void xrep_force_quotacheck(struct xfs_scrub *sc, uint dqtype); |
86 | int xrep_ino_dqattach(struct xfs_scrub_context *sc); | 86 | int xrep_ino_dqattach(struct xfs_scrub *sc); |
87 | 87 | ||
88 | /* Metadata repairers */ | 88 | /* Metadata repairers */ |
89 | 89 | ||
90 | int xrep_probe(struct xfs_scrub_context *sc); | 90 | int xrep_probe(struct xfs_scrub *sc); |
91 | int xrep_superblock(struct xfs_scrub_context *sc); | 91 | int xrep_superblock(struct xfs_scrub *sc); |
92 | 92 | ||
93 | #else | 93 | #else |
94 | 94 | ||
95 | static inline int xrep_attempt( | 95 | static inline int xrep_attempt( |
96 | struct xfs_inode *ip, | 96 | struct xfs_inode *ip, |
97 | struct xfs_scrub_context *sc, | 97 | struct xfs_scrub *sc, |
98 | bool *fixed) | 98 | bool *fixed) |
99 | { | 99 | { |
100 | return -EOPNOTSUPP; | 100 | return -EOPNOTSUPP; |
@@ -104,7 +104,7 @@ static inline void xrep_failure(struct xfs_mount *mp) {} | |||
104 | 104 | ||
105 | static inline xfs_extlen_t | 105 | static inline xfs_extlen_t |
106 | xrep_calc_ag_resblks( | 106 | xrep_calc_ag_resblks( |
107 | struct xfs_scrub_context *sc) | 107 | struct xfs_scrub *sc) |
108 | { | 108 | { |
109 | ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)); | 109 | ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)); |
110 | return 0; | 110 | return 0; |
diff --git a/fs/xfs/scrub/rmap.c b/fs/xfs/scrub/rmap.c index 4b75fc2f31f3..dc9c91a706ff 100644 --- a/fs/xfs/scrub/rmap.c +++ b/fs/xfs/scrub/rmap.c | |||
@@ -30,7 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | int | 31 | int |
32 | xchk_setup_ag_rmapbt( | 32 | xchk_setup_ag_rmapbt( |
33 | struct xfs_scrub_context *sc, | 33 | struct xfs_scrub *sc, |
34 | struct xfs_inode *ip) | 34 | struct xfs_inode *ip) |
35 | { | 35 | { |
36 | return xchk_setup_ag_btree(sc, ip, false); | 36 | return xchk_setup_ag_btree(sc, ip, false); |
@@ -41,7 +41,7 @@ xchk_setup_ag_rmapbt( | |||
41 | /* Cross-reference a rmap against the refcount btree. */ | 41 | /* Cross-reference a rmap against the refcount btree. */ |
42 | STATIC void | 42 | STATIC void |
43 | xchk_rmapbt_xref_refc( | 43 | xchk_rmapbt_xref_refc( |
44 | struct xfs_scrub_context *sc, | 44 | struct xfs_scrub *sc, |
45 | struct xfs_rmap_irec *irec) | 45 | struct xfs_rmap_irec *irec) |
46 | { | 46 | { |
47 | xfs_agblock_t fbno; | 47 | xfs_agblock_t fbno; |
@@ -72,7 +72,7 @@ xchk_rmapbt_xref_refc( | |||
72 | /* Cross-reference with the other btrees. */ | 72 | /* Cross-reference with the other btrees. */ |
73 | STATIC void | 73 | STATIC void |
74 | xchk_rmapbt_xref( | 74 | xchk_rmapbt_xref( |
75 | struct xfs_scrub_context *sc, | 75 | struct xfs_scrub *sc, |
76 | struct xfs_rmap_irec *irec) | 76 | struct xfs_rmap_irec *irec) |
77 | { | 77 | { |
78 | xfs_agblock_t agbno = irec->rm_startblock; | 78 | xfs_agblock_t agbno = irec->rm_startblock; |
@@ -172,7 +172,7 @@ out: | |||
172 | /* Scrub the rmap btree for some AG. */ | 172 | /* Scrub the rmap btree for some AG. */ |
173 | int | 173 | int |
174 | xchk_rmapbt( | 174 | xchk_rmapbt( |
175 | struct xfs_scrub_context *sc) | 175 | struct xfs_scrub *sc) |
176 | { | 176 | { |
177 | struct xfs_owner_info oinfo; | 177 | struct xfs_owner_info oinfo; |
178 | 178 | ||
@@ -184,7 +184,7 @@ xchk_rmapbt( | |||
184 | /* xref check that the extent is owned by a given owner */ | 184 | /* xref check that the extent is owned by a given owner */ |
185 | static inline void | 185 | static inline void |
186 | xchk_xref_check_owner( | 186 | xchk_xref_check_owner( |
187 | struct xfs_scrub_context *sc, | 187 | struct xfs_scrub *sc, |
188 | xfs_agblock_t bno, | 188 | xfs_agblock_t bno, |
189 | xfs_extlen_t len, | 189 | xfs_extlen_t len, |
190 | struct xfs_owner_info *oinfo, | 190 | struct xfs_owner_info *oinfo, |
@@ -207,7 +207,7 @@ xchk_xref_check_owner( | |||
207 | /* xref check that the extent is owned by a given owner */ | 207 | /* xref check that the extent is owned by a given owner */ |
208 | void | 208 | void |
209 | xchk_xref_is_owned_by( | 209 | xchk_xref_is_owned_by( |
210 | struct xfs_scrub_context *sc, | 210 | struct xfs_scrub *sc, |
211 | xfs_agblock_t bno, | 211 | xfs_agblock_t bno, |
212 | xfs_extlen_t len, | 212 | xfs_extlen_t len, |
213 | struct xfs_owner_info *oinfo) | 213 | struct xfs_owner_info *oinfo) |
@@ -218,7 +218,7 @@ xchk_xref_is_owned_by( | |||
218 | /* xref check that the extent is not owned by a given owner */ | 218 | /* xref check that the extent is not owned by a given owner */ |
219 | void | 219 | void |
220 | xchk_xref_is_not_owned_by( | 220 | xchk_xref_is_not_owned_by( |
221 | struct xfs_scrub_context *sc, | 221 | struct xfs_scrub *sc, |
222 | xfs_agblock_t bno, | 222 | xfs_agblock_t bno, |
223 | xfs_extlen_t len, | 223 | xfs_extlen_t len, |
224 | struct xfs_owner_info *oinfo) | 224 | struct xfs_owner_info *oinfo) |
@@ -229,7 +229,7 @@ xchk_xref_is_not_owned_by( | |||
229 | /* xref check that the extent has no reverse mapping at all */ | 229 | /* xref check that the extent has no reverse mapping at all */ |
230 | void | 230 | void |
231 | xchk_xref_has_no_owner( | 231 | xchk_xref_has_no_owner( |
232 | struct xfs_scrub_context *sc, | 232 | struct xfs_scrub *sc, |
233 | xfs_agblock_t bno, | 233 | xfs_agblock_t bno, |
234 | xfs_extlen_t len) | 234 | xfs_extlen_t len) |
235 | { | 235 | { |
diff --git a/fs/xfs/scrub/rtbitmap.c b/fs/xfs/scrub/rtbitmap.c index 3f0fc83562ae..653a809bba34 100644 --- a/fs/xfs/scrub/rtbitmap.c +++ b/fs/xfs/scrub/rtbitmap.c | |||
@@ -26,7 +26,7 @@ | |||
26 | /* Set us up with the realtime metadata locked. */ | 26 | /* Set us up with the realtime metadata locked. */ |
27 | int | 27 | int |
28 | xchk_setup_rt( | 28 | xchk_setup_rt( |
29 | struct xfs_scrub_context *sc, | 29 | struct xfs_scrub *sc, |
30 | struct xfs_inode *ip) | 30 | struct xfs_inode *ip) |
31 | { | 31 | { |
32 | int error; | 32 | int error; |
@@ -51,7 +51,7 @@ xchk_rtbitmap_rec( | |||
51 | struct xfs_rtalloc_rec *rec, | 51 | struct xfs_rtalloc_rec *rec, |
52 | void *priv) | 52 | void *priv) |
53 | { | 53 | { |
54 | struct xfs_scrub_context *sc = priv; | 54 | struct xfs_scrub *sc = priv; |
55 | xfs_rtblock_t startblock; | 55 | xfs_rtblock_t startblock; |
56 | xfs_rtblock_t blockcount; | 56 | xfs_rtblock_t blockcount; |
57 | 57 | ||
@@ -68,7 +68,7 @@ xchk_rtbitmap_rec( | |||
68 | /* Scrub the realtime bitmap. */ | 68 | /* Scrub the realtime bitmap. */ |
69 | int | 69 | int |
70 | xchk_rtbitmap( | 70 | xchk_rtbitmap( |
71 | struct xfs_scrub_context *sc) | 71 | struct xfs_scrub *sc) |
72 | { | 72 | { |
73 | int error; | 73 | int error; |
74 | 74 | ||
@@ -88,7 +88,7 @@ out: | |||
88 | /* Scrub the realtime summary. */ | 88 | /* Scrub the realtime summary. */ |
89 | int | 89 | int |
90 | xchk_rtsummary( | 90 | xchk_rtsummary( |
91 | struct xfs_scrub_context *sc) | 91 | struct xfs_scrub *sc) |
92 | { | 92 | { |
93 | struct xfs_inode *rsumip = sc->mp->m_rsumip; | 93 | struct xfs_inode *rsumip = sc->mp->m_rsumip; |
94 | struct xfs_inode *old_ip = sc->ip; | 94 | struct xfs_inode *old_ip = sc->ip; |
@@ -125,7 +125,7 @@ out: | |||
125 | /* xref check that the extent is not free in the rtbitmap */ | 125 | /* xref check that the extent is not free in the rtbitmap */ |
126 | void | 126 | void |
127 | xchk_xref_is_used_rt_space( | 127 | xchk_xref_is_used_rt_space( |
128 | struct xfs_scrub_context *sc, | 128 | struct xfs_scrub *sc, |
129 | xfs_rtblock_t fsbno, | 129 | xfs_rtblock_t fsbno, |
130 | xfs_extlen_t len) | 130 | xfs_extlen_t len) |
131 | { | 131 | { |
diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index a6efede6e430..b3c6420ccae5 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c | |||
@@ -151,7 +151,7 @@ | |||
151 | */ | 151 | */ |
152 | static int | 152 | static int |
153 | xchk_probe( | 153 | xchk_probe( |
154 | struct xfs_scrub_context *sc) | 154 | struct xfs_scrub *sc) |
155 | { | 155 | { |
156 | int error = 0; | 156 | int error = 0; |
157 | 157 | ||
@@ -166,7 +166,7 @@ xchk_probe( | |||
166 | /* Free all the resources and finish the transactions. */ | 166 | /* Free all the resources and finish the transactions. */ |
167 | STATIC int | 167 | STATIC int |
168 | xchk_teardown( | 168 | xchk_teardown( |
169 | struct xfs_scrub_context *sc, | 169 | struct xfs_scrub *sc, |
170 | struct xfs_inode *ip_in, | 170 | struct xfs_inode *ip_in, |
171 | int error) | 171 | int error) |
172 | { | 172 | { |
@@ -447,7 +447,7 @@ out: | |||
447 | } | 447 | } |
448 | 448 | ||
449 | #ifdef CONFIG_XFS_ONLINE_REPAIR | 449 | #ifdef CONFIG_XFS_ONLINE_REPAIR |
450 | static inline void xchk_postmortem(struct xfs_scrub_context *sc) | 450 | static inline void xchk_postmortem(struct xfs_scrub *sc) |
451 | { | 451 | { |
452 | /* | 452 | /* |
453 | * Userspace asked us to repair something, we repaired it, rescanned | 453 | * Userspace asked us to repair something, we repaired it, rescanned |
@@ -460,7 +460,7 @@ static inline void xchk_postmortem(struct xfs_scrub_context *sc) | |||
460 | xrep_failure(sc->mp); | 460 | xrep_failure(sc->mp); |
461 | } | 461 | } |
462 | #else | 462 | #else |
463 | static inline void xchk_postmortem(struct xfs_scrub_context *sc) | 463 | static inline void xchk_postmortem(struct xfs_scrub *sc) |
464 | { | 464 | { |
465 | /* | 465 | /* |
466 | * Userspace asked us to scrub something, it's broken, and we have no | 466 | * Userspace asked us to scrub something, it's broken, and we have no |
@@ -479,7 +479,7 @@ xfs_scrub_metadata( | |||
479 | struct xfs_inode *ip, | 479 | struct xfs_inode *ip, |
480 | struct xfs_scrub_metadata *sm) | 480 | struct xfs_scrub_metadata *sm) |
481 | { | 481 | { |
482 | struct xfs_scrub_context sc; | 482 | struct xfs_scrub sc; |
483 | struct xfs_mount *mp = ip->i_mount; | 483 | struct xfs_mount *mp = ip->i_mount; |
484 | bool try_harder = false; | 484 | bool try_harder = false; |
485 | bool already_fixed = false; | 485 | bool already_fixed = false; |
diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h index 0f59a47c4bb0..47c75d2f28da 100644 --- a/fs/xfs/scrub/scrub.h +++ b/fs/xfs/scrub/scrub.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #ifndef __XFS_SCRUB_SCRUB_H__ | 6 | #ifndef __XFS_SCRUB_SCRUB_H__ |
7 | #define __XFS_SCRUB_SCRUB_H__ | 7 | #define __XFS_SCRUB_SCRUB_H__ |
8 | 8 | ||
9 | struct xfs_scrub_context; | 9 | struct xfs_scrub; |
10 | 10 | ||
11 | /* Type info and names for the scrub types. */ | 11 | /* Type info and names for the scrub types. */ |
12 | enum xchk_type { | 12 | enum xchk_type { |
@@ -18,14 +18,14 @@ enum xchk_type { | |||
18 | 18 | ||
19 | struct xchk_meta_ops { | 19 | struct xchk_meta_ops { |
20 | /* Acquire whatever resources are needed for the operation. */ | 20 | /* Acquire whatever resources are needed for the operation. */ |
21 | int (*setup)(struct xfs_scrub_context *, | 21 | int (*setup)(struct xfs_scrub *, |
22 | struct xfs_inode *); | 22 | struct xfs_inode *); |
23 | 23 | ||
24 | /* Examine metadata for errors. */ | 24 | /* Examine metadata for errors. */ |
25 | int (*scrub)(struct xfs_scrub_context *); | 25 | int (*scrub)(struct xfs_scrub *); |
26 | 26 | ||
27 | /* Repair or optimize the metadata. */ | 27 | /* Repair or optimize the metadata. */ |
28 | int (*repair)(struct xfs_scrub_context *); | 28 | int (*repair)(struct xfs_scrub *); |
29 | 29 | ||
30 | /* Decide if we even have this piece of metadata. */ | 30 | /* Decide if we even have this piece of metadata. */ |
31 | bool (*has)(struct xfs_sb *); | 31 | bool (*has)(struct xfs_sb *); |
@@ -53,7 +53,7 @@ struct xchk_ag { | |||
53 | struct xfs_btree_cur *refc_cur; | 53 | struct xfs_btree_cur *refc_cur; |
54 | }; | 54 | }; |
55 | 55 | ||
56 | struct xfs_scrub_context { | 56 | struct xfs_scrub { |
57 | /* General scrub state. */ | 57 | /* General scrub state. */ |
58 | struct xfs_mount *mp; | 58 | struct xfs_mount *mp; |
59 | struct xfs_scrub_metadata *sm; | 59 | struct xfs_scrub_metadata *sm; |
@@ -70,71 +70,71 @@ struct xfs_scrub_context { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | /* Metadata scrubbers */ | 72 | /* Metadata scrubbers */ |
73 | int xchk_tester(struct xfs_scrub_context *sc); | 73 | int xchk_tester(struct xfs_scrub *sc); |
74 | int xchk_superblock(struct xfs_scrub_context *sc); | 74 | int xchk_superblock(struct xfs_scrub *sc); |
75 | int xchk_agf(struct xfs_scrub_context *sc); | 75 | int xchk_agf(struct xfs_scrub *sc); |
76 | int xchk_agfl(struct xfs_scrub_context *sc); | 76 | int xchk_agfl(struct xfs_scrub *sc); |
77 | int xchk_agi(struct xfs_scrub_context *sc); | 77 | int xchk_agi(struct xfs_scrub *sc); |
78 | int xchk_bnobt(struct xfs_scrub_context *sc); | 78 | int xchk_bnobt(struct xfs_scrub *sc); |
79 | int xchk_cntbt(struct xfs_scrub_context *sc); | 79 | int xchk_cntbt(struct xfs_scrub *sc); |
80 | int xchk_inobt(struct xfs_scrub_context *sc); | 80 | int xchk_inobt(struct xfs_scrub *sc); |
81 | int xchk_finobt(struct xfs_scrub_context *sc); | 81 | int xchk_finobt(struct xfs_scrub *sc); |
82 | int xchk_rmapbt(struct xfs_scrub_context *sc); | 82 | int xchk_rmapbt(struct xfs_scrub *sc); |
83 | int xchk_refcountbt(struct xfs_scrub_context *sc); | 83 | int xchk_refcountbt(struct xfs_scrub *sc); |
84 | int xchk_inode(struct xfs_scrub_context *sc); | 84 | int xchk_inode(struct xfs_scrub *sc); |
85 | int xchk_bmap_data(struct xfs_scrub_context *sc); | 85 | int xchk_bmap_data(struct xfs_scrub *sc); |
86 | int xchk_bmap_attr(struct xfs_scrub_context *sc); | 86 | int xchk_bmap_attr(struct xfs_scrub *sc); |
87 | int xchk_bmap_cow(struct xfs_scrub_context *sc); | 87 | int xchk_bmap_cow(struct xfs_scrub *sc); |
88 | int xchk_directory(struct xfs_scrub_context *sc); | 88 | int xchk_directory(struct xfs_scrub *sc); |
89 | int xchk_xattr(struct xfs_scrub_context *sc); | 89 | int xchk_xattr(struct xfs_scrub *sc); |
90 | int xchk_symlink(struct xfs_scrub_context *sc); | 90 | int xchk_symlink(struct xfs_scrub *sc); |
91 | int xchk_parent(struct xfs_scrub_context *sc); | 91 | int xchk_parent(struct xfs_scrub *sc); |
92 | #ifdef CONFIG_XFS_RT | 92 | #ifdef CONFIG_XFS_RT |
93 | int xchk_rtbitmap(struct xfs_scrub_context *sc); | 93 | int xchk_rtbitmap(struct xfs_scrub *sc); |
94 | int xchk_rtsummary(struct xfs_scrub_context *sc); | 94 | int xchk_rtsummary(struct xfs_scrub *sc); |
95 | #else | 95 | #else |
96 | static inline int | 96 | static inline int |
97 | xchk_rtbitmap(struct xfs_scrub_context *sc) | 97 | xchk_rtbitmap(struct xfs_scrub *sc) |
98 | { | 98 | { |
99 | return -ENOENT; | 99 | return -ENOENT; |
100 | } | 100 | } |
101 | static inline int | 101 | static inline int |
102 | xchk_rtsummary(struct xfs_scrub_context *sc) | 102 | xchk_rtsummary(struct xfs_scrub *sc) |
103 | { | 103 | { |
104 | return -ENOENT; | 104 | return -ENOENT; |
105 | } | 105 | } |
106 | #endif | 106 | #endif |
107 | #ifdef CONFIG_XFS_QUOTA | 107 | #ifdef CONFIG_XFS_QUOTA |
108 | int xchk_quota(struct xfs_scrub_context *sc); | 108 | int xchk_quota(struct xfs_scrub *sc); |
109 | #else | 109 | #else |
110 | static inline int | 110 | static inline int |
111 | xchk_quota(struct xfs_scrub_context *sc) | 111 | xchk_quota(struct xfs_scrub *sc) |
112 | { | 112 | { |
113 | return -ENOENT; | 113 | return -ENOENT; |
114 | } | 114 | } |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | /* cross-referencing helpers */ | 117 | /* cross-referencing helpers */ |
118 | void xchk_xref_is_used_space(struct xfs_scrub_context *sc, | 118 | void xchk_xref_is_used_space(struct xfs_scrub *sc, |
119 | xfs_agblock_t agbno, xfs_extlen_t len); | 119 | xfs_agblock_t agbno, xfs_extlen_t len); |
120 | void xchk_xref_is_not_inode_chunk(struct xfs_scrub_context *sc, | 120 | void xchk_xref_is_not_inode_chunk(struct xfs_scrub *sc, |
121 | xfs_agblock_t agbno, xfs_extlen_t len); | 121 | xfs_agblock_t agbno, xfs_extlen_t len); |
122 | void xchk_xref_is_inode_chunk(struct xfs_scrub_context *sc, | 122 | void xchk_xref_is_inode_chunk(struct xfs_scrub *sc, |
123 | xfs_agblock_t agbno, xfs_extlen_t len); | 123 | xfs_agblock_t agbno, xfs_extlen_t len); |
124 | void xchk_xref_is_owned_by(struct xfs_scrub_context *sc, | 124 | void xchk_xref_is_owned_by(struct xfs_scrub *sc, |
125 | xfs_agblock_t agbno, xfs_extlen_t len, | 125 | xfs_agblock_t agbno, xfs_extlen_t len, |
126 | struct xfs_owner_info *oinfo); | 126 | struct xfs_owner_info *oinfo); |
127 | void xchk_xref_is_not_owned_by(struct xfs_scrub_context *sc, | 127 | void xchk_xref_is_not_owned_by(struct xfs_scrub *sc, |
128 | xfs_agblock_t agbno, xfs_extlen_t len, | 128 | xfs_agblock_t agbno, xfs_extlen_t len, |
129 | struct xfs_owner_info *oinfo); | 129 | struct xfs_owner_info *oinfo); |
130 | void xchk_xref_has_no_owner(struct xfs_scrub_context *sc, | 130 | void xchk_xref_has_no_owner(struct xfs_scrub *sc, |
131 | xfs_agblock_t agbno, xfs_extlen_t len); | 131 | xfs_agblock_t agbno, xfs_extlen_t len); |
132 | void xchk_xref_is_cow_staging(struct xfs_scrub_context *sc, | 132 | void xchk_xref_is_cow_staging(struct xfs_scrub *sc, |
133 | xfs_agblock_t bno, xfs_extlen_t len); | 133 | xfs_agblock_t bno, xfs_extlen_t len); |
134 | void xchk_xref_is_not_shared(struct xfs_scrub_context *sc, | 134 | void xchk_xref_is_not_shared(struct xfs_scrub *sc, |
135 | xfs_agblock_t bno, xfs_extlen_t len); | 135 | xfs_agblock_t bno, xfs_extlen_t len); |
136 | #ifdef CONFIG_XFS_RT | 136 | #ifdef CONFIG_XFS_RT |
137 | void xchk_xref_is_used_rt_space(struct xfs_scrub_context *sc, | 137 | void xchk_xref_is_used_rt_space(struct xfs_scrub *sc, |
138 | xfs_rtblock_t rtbno, xfs_extlen_t len); | 138 | xfs_rtblock_t rtbno, xfs_extlen_t len); |
139 | #else | 139 | #else |
140 | # define xchk_xref_is_used_rt_space(sc, rtbno, len) do { } while (0) | 140 | # define xchk_xref_is_used_rt_space(sc, rtbno, len) do { } while (0) |
diff --git a/fs/xfs/scrub/symlink.c b/fs/xfs/scrub/symlink.c index e2a288e34337..56c6347e9482 100644 --- a/fs/xfs/scrub/symlink.c +++ b/fs/xfs/scrub/symlink.c | |||
@@ -26,7 +26,7 @@ | |||
26 | /* Set us up to scrub a symbolic link. */ | 26 | /* Set us up to scrub a symbolic link. */ |
27 | int | 27 | int |
28 | xchk_setup_symlink( | 28 | xchk_setup_symlink( |
29 | struct xfs_scrub_context *sc, | 29 | struct xfs_scrub *sc, |
30 | struct xfs_inode *ip) | 30 | struct xfs_inode *ip) |
31 | { | 31 | { |
32 | /* Allocate the buffer without the inode lock held. */ | 32 | /* Allocate the buffer without the inode lock held. */ |
@@ -41,7 +41,7 @@ xchk_setup_symlink( | |||
41 | 41 | ||
42 | int | 42 | int |
43 | xchk_symlink( | 43 | xchk_symlink( |
44 | struct xfs_scrub_context *sc) | 44 | struct xfs_scrub *sc) |
45 | { | 45 | { |
46 | struct xfs_inode *ip = sc->ip; | 46 | struct xfs_inode *ip = sc->ip; |
47 | struct xfs_ifork *ifp; | 47 | struct xfs_ifork *ifp; |
diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h index 96f3edda3e91..93db22c39b51 100644 --- a/fs/xfs/scrub/trace.h +++ b/fs/xfs/scrub/trace.h | |||
@@ -59,7 +59,7 @@ DEFINE_SCRUB_EVENT(xrep_attempt); | |||
59 | DEFINE_SCRUB_EVENT(xrep_done); | 59 | DEFINE_SCRUB_EVENT(xrep_done); |
60 | 60 | ||
61 | TRACE_EVENT(xchk_op_error, | 61 | TRACE_EVENT(xchk_op_error, |
62 | TP_PROTO(struct xfs_scrub_context *sc, xfs_agnumber_t agno, | 62 | TP_PROTO(struct xfs_scrub *sc, xfs_agnumber_t agno, |
63 | xfs_agblock_t bno, int error, void *ret_ip), | 63 | xfs_agblock_t bno, int error, void *ret_ip), |
64 | TP_ARGS(sc, agno, bno, error, ret_ip), | 64 | TP_ARGS(sc, agno, bno, error, ret_ip), |
65 | TP_STRUCT__entry( | 65 | TP_STRUCT__entry( |
@@ -88,7 +88,7 @@ TRACE_EVENT(xchk_op_error, | |||
88 | ); | 88 | ); |
89 | 89 | ||
90 | TRACE_EVENT(xchk_file_op_error, | 90 | TRACE_EVENT(xchk_file_op_error, |
91 | TP_PROTO(struct xfs_scrub_context *sc, int whichfork, | 91 | TP_PROTO(struct xfs_scrub *sc, int whichfork, |
92 | xfs_fileoff_t offset, int error, void *ret_ip), | 92 | xfs_fileoff_t offset, int error, void *ret_ip), |
93 | TP_ARGS(sc, whichfork, offset, error, ret_ip), | 93 | TP_ARGS(sc, whichfork, offset, error, ret_ip), |
94 | TP_STRUCT__entry( | 94 | TP_STRUCT__entry( |
@@ -120,7 +120,7 @@ TRACE_EVENT(xchk_file_op_error, | |||
120 | ); | 120 | ); |
121 | 121 | ||
122 | DECLARE_EVENT_CLASS(xchk_block_error_class, | 122 | DECLARE_EVENT_CLASS(xchk_block_error_class, |
123 | TP_PROTO(struct xfs_scrub_context *sc, xfs_daddr_t daddr, void *ret_ip), | 123 | TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, void *ret_ip), |
124 | TP_ARGS(sc, daddr, ret_ip), | 124 | TP_ARGS(sc, daddr, ret_ip), |
125 | TP_STRUCT__entry( | 125 | TP_STRUCT__entry( |
126 | __field(dev_t, dev) | 126 | __field(dev_t, dev) |
@@ -154,7 +154,7 @@ DECLARE_EVENT_CLASS(xchk_block_error_class, | |||
154 | 154 | ||
155 | #define DEFINE_SCRUB_BLOCK_ERROR_EVENT(name) \ | 155 | #define DEFINE_SCRUB_BLOCK_ERROR_EVENT(name) \ |
156 | DEFINE_EVENT(xchk_block_error_class, name, \ | 156 | DEFINE_EVENT(xchk_block_error_class, name, \ |
157 | TP_PROTO(struct xfs_scrub_context *sc, xfs_daddr_t daddr, \ | 157 | TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, \ |
158 | void *ret_ip), \ | 158 | void *ret_ip), \ |
159 | TP_ARGS(sc, daddr, ret_ip)) | 159 | TP_ARGS(sc, daddr, ret_ip)) |
160 | 160 | ||
@@ -162,7 +162,7 @@ DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_error); | |||
162 | DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_preen); | 162 | DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_preen); |
163 | 163 | ||
164 | DECLARE_EVENT_CLASS(xchk_ino_error_class, | 164 | DECLARE_EVENT_CLASS(xchk_ino_error_class, |
165 | TP_PROTO(struct xfs_scrub_context *sc, xfs_ino_t ino, void *ret_ip), | 165 | TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, void *ret_ip), |
166 | TP_ARGS(sc, ino, ret_ip), | 166 | TP_ARGS(sc, ino, ret_ip), |
167 | TP_STRUCT__entry( | 167 | TP_STRUCT__entry( |
168 | __field(dev_t, dev) | 168 | __field(dev_t, dev) |
@@ -185,7 +185,7 @@ DECLARE_EVENT_CLASS(xchk_ino_error_class, | |||
185 | 185 | ||
186 | #define DEFINE_SCRUB_INO_ERROR_EVENT(name) \ | 186 | #define DEFINE_SCRUB_INO_ERROR_EVENT(name) \ |
187 | DEFINE_EVENT(xchk_ino_error_class, name, \ | 187 | DEFINE_EVENT(xchk_ino_error_class, name, \ |
188 | TP_PROTO(struct xfs_scrub_context *sc, xfs_ino_t ino, \ | 188 | TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, \ |
189 | void *ret_ip), \ | 189 | void *ret_ip), \ |
190 | TP_ARGS(sc, ino, ret_ip)) | 190 | TP_ARGS(sc, ino, ret_ip)) |
191 | 191 | ||
@@ -194,7 +194,7 @@ DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_preen); | |||
194 | DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_warning); | 194 | DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_warning); |
195 | 195 | ||
196 | DECLARE_EVENT_CLASS(xchk_fblock_error_class, | 196 | DECLARE_EVENT_CLASS(xchk_fblock_error_class, |
197 | TP_PROTO(struct xfs_scrub_context *sc, int whichfork, | 197 | TP_PROTO(struct xfs_scrub *sc, int whichfork, |
198 | xfs_fileoff_t offset, void *ret_ip), | 198 | xfs_fileoff_t offset, void *ret_ip), |
199 | TP_ARGS(sc, whichfork, offset, ret_ip), | 199 | TP_ARGS(sc, whichfork, offset, ret_ip), |
200 | TP_STRUCT__entry( | 200 | TP_STRUCT__entry( |
@@ -224,7 +224,7 @@ DECLARE_EVENT_CLASS(xchk_fblock_error_class, | |||
224 | 224 | ||
225 | #define DEFINE_SCRUB_FBLOCK_ERROR_EVENT(name) \ | 225 | #define DEFINE_SCRUB_FBLOCK_ERROR_EVENT(name) \ |
226 | DEFINE_EVENT(xchk_fblock_error_class, name, \ | 226 | DEFINE_EVENT(xchk_fblock_error_class, name, \ |
227 | TP_PROTO(struct xfs_scrub_context *sc, int whichfork, \ | 227 | TP_PROTO(struct xfs_scrub *sc, int whichfork, \ |
228 | xfs_fileoff_t offset, void *ret_ip), \ | 228 | xfs_fileoff_t offset, void *ret_ip), \ |
229 | TP_ARGS(sc, whichfork, offset, ret_ip)) | 229 | TP_ARGS(sc, whichfork, offset, ret_ip)) |
230 | 230 | ||
@@ -232,7 +232,7 @@ DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_error); | |||
232 | DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning); | 232 | DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning); |
233 | 233 | ||
234 | TRACE_EVENT(xchk_incomplete, | 234 | TRACE_EVENT(xchk_incomplete, |
235 | TP_PROTO(struct xfs_scrub_context *sc, void *ret_ip), | 235 | TP_PROTO(struct xfs_scrub *sc, void *ret_ip), |
236 | TP_ARGS(sc, ret_ip), | 236 | TP_ARGS(sc, ret_ip), |
237 | TP_STRUCT__entry( | 237 | TP_STRUCT__entry( |
238 | __field(dev_t, dev) | 238 | __field(dev_t, dev) |
@@ -251,7 +251,7 @@ TRACE_EVENT(xchk_incomplete, | |||
251 | ); | 251 | ); |
252 | 252 | ||
253 | TRACE_EVENT(xchk_btree_op_error, | 253 | TRACE_EVENT(xchk_btree_op_error, |
254 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 254 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
255 | int level, int error, void *ret_ip), | 255 | int level, int error, void *ret_ip), |
256 | TP_ARGS(sc, cur, level, error, ret_ip), | 256 | TP_ARGS(sc, cur, level, error, ret_ip), |
257 | TP_STRUCT__entry( | 257 | TP_STRUCT__entry( |
@@ -291,7 +291,7 @@ TRACE_EVENT(xchk_btree_op_error, | |||
291 | ); | 291 | ); |
292 | 292 | ||
293 | TRACE_EVENT(xchk_ifork_btree_op_error, | 293 | TRACE_EVENT(xchk_ifork_btree_op_error, |
294 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 294 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
295 | int level, int error, void *ret_ip), | 295 | int level, int error, void *ret_ip), |
296 | TP_ARGS(sc, cur, level, error, ret_ip), | 296 | TP_ARGS(sc, cur, level, error, ret_ip), |
297 | TP_STRUCT__entry( | 297 | TP_STRUCT__entry( |
@@ -336,7 +336,7 @@ TRACE_EVENT(xchk_ifork_btree_op_error, | |||
336 | ); | 336 | ); |
337 | 337 | ||
338 | TRACE_EVENT(xchk_btree_error, | 338 | TRACE_EVENT(xchk_btree_error, |
339 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 339 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
340 | int level, void *ret_ip), | 340 | int level, void *ret_ip), |
341 | TP_ARGS(sc, cur, level, ret_ip), | 341 | TP_ARGS(sc, cur, level, ret_ip), |
342 | TP_STRUCT__entry( | 342 | TP_STRUCT__entry( |
@@ -372,7 +372,7 @@ TRACE_EVENT(xchk_btree_error, | |||
372 | ); | 372 | ); |
373 | 373 | ||
374 | TRACE_EVENT(xchk_ifork_btree_error, | 374 | TRACE_EVENT(xchk_ifork_btree_error, |
375 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 375 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
376 | int level, void *ret_ip), | 376 | int level, void *ret_ip), |
377 | TP_ARGS(sc, cur, level, ret_ip), | 377 | TP_ARGS(sc, cur, level, ret_ip), |
378 | TP_STRUCT__entry( | 378 | TP_STRUCT__entry( |
@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_ifork_btree_error, | |||
414 | ); | 414 | ); |
415 | 415 | ||
416 | DECLARE_EVENT_CLASS(xchk_sbtree_class, | 416 | DECLARE_EVENT_CLASS(xchk_sbtree_class, |
417 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, | 417 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, |
418 | int level), | 418 | int level), |
419 | TP_ARGS(sc, cur, level), | 419 | TP_ARGS(sc, cur, level), |
420 | TP_STRUCT__entry( | 420 | TP_STRUCT__entry( |
@@ -451,7 +451,7 @@ DECLARE_EVENT_CLASS(xchk_sbtree_class, | |||
451 | ) | 451 | ) |
452 | #define DEFINE_SCRUB_SBTREE_EVENT(name) \ | 452 | #define DEFINE_SCRUB_SBTREE_EVENT(name) \ |
453 | DEFINE_EVENT(xchk_sbtree_class, name, \ | 453 | DEFINE_EVENT(xchk_sbtree_class, name, \ |
454 | TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, \ | 454 | TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, \ |
455 | int level), \ | 455 | int level), \ |
456 | TP_ARGS(sc, cur, level)) | 456 | TP_ARGS(sc, cur, level)) |
457 | 457 | ||
@@ -459,7 +459,7 @@ DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_rec); | |||
459 | DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_key); | 459 | DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_key); |
460 | 460 | ||
461 | TRACE_EVENT(xchk_xref_error, | 461 | TRACE_EVENT(xchk_xref_error, |
462 | TP_PROTO(struct xfs_scrub_context *sc, int error, void *ret_ip), | 462 | TP_PROTO(struct xfs_scrub *sc, int error, void *ret_ip), |
463 | TP_ARGS(sc, error, ret_ip), | 463 | TP_ARGS(sc, error, ret_ip), |
464 | TP_STRUCT__entry( | 464 | TP_STRUCT__entry( |
465 | __field(dev_t, dev) | 465 | __field(dev_t, dev) |