Commit 1d8a748a authored by Darrick J. Wong's avatar Darrick J. Wong

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: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
parent b5e2196e
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_superblock_xref( xchk_superblock_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
...@@ -66,7 +66,7 @@ xchk_superblock_xref( ...@@ -66,7 +66,7 @@ xchk_superblock_xref(
*/ */
int int
xchk_superblock( xchk_superblock(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_buf *bp; struct xfs_buf *bp;
...@@ -365,7 +365,7 @@ xchk_agf_record_bno_lengths( ...@@ -365,7 +365,7 @@ xchk_agf_record_bno_lengths(
/* Check agf_freeblks */ /* Check agf_freeblks */
static inline void static inline void
xchk_agf_xref_freeblks( xchk_agf_xref_freeblks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
xfs_extlen_t blocks = 0; xfs_extlen_t blocks = 0;
...@@ -385,7 +385,7 @@ xchk_agf_xref_freeblks( ...@@ -385,7 +385,7 @@ xchk_agf_xref_freeblks(
/* Cross reference the AGF with the cntbt (freespace by length btree) */ /* Cross reference the AGF with the cntbt (freespace by length btree) */
static inline void static inline void
xchk_agf_xref_cntbt( xchk_agf_xref_cntbt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
xfs_agblock_t agbno; xfs_agblock_t agbno;
...@@ -417,7 +417,7 @@ xchk_agf_xref_cntbt( ...@@ -417,7 +417,7 @@ xchk_agf_xref_cntbt(
/* Check the btree block counts in the AGF against the btrees. */ /* Check the btree block counts in the AGF against the btrees. */
STATIC void STATIC void
xchk_agf_xref_btreeblks( xchk_agf_xref_btreeblks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -463,7 +463,7 @@ xchk_agf_xref_btreeblks( ...@@ -463,7 +463,7 @@ xchk_agf_xref_btreeblks(
/* Check agf_refcount_blocks against tree size */ /* Check agf_refcount_blocks against tree size */
static inline void static inline void
xchk_agf_xref_refcblks( xchk_agf_xref_refcblks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp); struct xfs_agf *agf = XFS_BUF_TO_AGF(sc->sa.agf_bp);
xfs_agblock_t blocks; xfs_agblock_t blocks;
...@@ -482,7 +482,7 @@ xchk_agf_xref_refcblks( ...@@ -482,7 +482,7 @@ xchk_agf_xref_refcblks(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_agf_xref( xchk_agf_xref(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -514,7 +514,7 @@ xchk_agf_xref( ...@@ -514,7 +514,7 @@ xchk_agf_xref(
/* Scrub the AGF. */ /* Scrub the AGF. */
int int
xchk_agf( xchk_agf(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_agf *agf; struct xfs_agf *agf;
...@@ -602,13 +602,13 @@ struct xchk_agfl_info { ...@@ -602,13 +602,13 @@ struct xchk_agfl_info {
unsigned int sz_entries; unsigned int sz_entries;
unsigned int nr_entries; unsigned int nr_entries;
xfs_agblock_t *entries; xfs_agblock_t *entries;
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
}; };
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_agfl_block_xref( xchk_agfl_block_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
struct xfs_owner_info *oinfo) struct xfs_owner_info *oinfo)
{ {
...@@ -629,7 +629,7 @@ xchk_agfl_block( ...@@ -629,7 +629,7 @@ xchk_agfl_block(
void *priv) void *priv)
{ {
struct xchk_agfl_info *sai = priv; struct xchk_agfl_info *sai = priv;
struct xfs_scrub_context *sc = sai->sc; struct xfs_scrub *sc = sai->sc;
xfs_agnumber_t agno = sc->sa.agno; xfs_agnumber_t agno = sc->sa.agno;
if (xfs_verify_agbno(mp, agno, agbno) && if (xfs_verify_agbno(mp, agno, agbno) &&
...@@ -660,7 +660,7 @@ xchk_agblock_cmp( ...@@ -660,7 +660,7 @@ xchk_agblock_cmp(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_agfl_xref( xchk_agfl_xref(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -691,7 +691,7 @@ xchk_agfl_xref( ...@@ -691,7 +691,7 @@ xchk_agfl_xref(
/* Scrub the AGFL. */ /* Scrub the AGFL. */
int int
xchk_agfl( xchk_agfl(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xchk_agfl_info sai; struct xchk_agfl_info sai;
struct xfs_agf *agf; struct xfs_agf *agf;
...@@ -768,7 +768,7 @@ xchk_agfl( ...@@ -768,7 +768,7 @@ xchk_agfl(
/* Check agi_count/agi_freecount */ /* Check agi_count/agi_freecount */
static inline void static inline void
xchk_agi_xref_icounts( xchk_agi_xref_icounts(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp); struct xfs_agi *agi = XFS_BUF_TO_AGI(sc->sa.agi_bp);
xfs_agino_t icount; xfs_agino_t icount;
...@@ -789,7 +789,7 @@ xchk_agi_xref_icounts( ...@@ -789,7 +789,7 @@ xchk_agi_xref_icounts(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_agi_xref( xchk_agi_xref(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -818,7 +818,7 @@ xchk_agi_xref( ...@@ -818,7 +818,7 @@ xchk_agi_xref(
/* Scrub the AGI. */ /* Scrub the AGI. */
int int
xchk_agi( xchk_agi(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_agi *agi; struct xfs_agi *agi;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
/* Repair the superblock. */ /* Repair the superblock. */
int int
xrep_superblock( xrep_superblock(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_buf *bp; struct xfs_buf *bp;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
int int
xchk_setup_ag_allocbt( xchk_setup_ag_allocbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_ag_btree(sc, ip, false); return xchk_setup_ag_btree(sc, ip, false);
...@@ -42,7 +42,7 @@ xchk_setup_ag_allocbt( ...@@ -42,7 +42,7 @@ xchk_setup_ag_allocbt(
*/ */
STATIC void STATIC void
xchk_allocbt_xref_other( xchk_allocbt_xref_other(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
...@@ -82,7 +82,7 @@ xchk_allocbt_xref_other( ...@@ -82,7 +82,7 @@ xchk_allocbt_xref_other(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_allocbt_xref( xchk_allocbt_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
...@@ -123,7 +123,7 @@ xchk_allocbt_rec( ...@@ -123,7 +123,7 @@ xchk_allocbt_rec(
/* Scrub the freespace btrees for some AG. */ /* Scrub the freespace btrees for some AG. */
STATIC int STATIC int
xchk_allocbt( xchk_allocbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_btnum_t which) xfs_btnum_t which)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
...@@ -136,14 +136,14 @@ xchk_allocbt( ...@@ -136,14 +136,14 @@ xchk_allocbt(
int int
xchk_bnobt( xchk_bnobt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_allocbt(sc, XFS_BTNUM_BNO); return xchk_allocbt(sc, XFS_BTNUM_BNO);
} }
int int
xchk_cntbt( xchk_cntbt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_allocbt(sc, XFS_BTNUM_CNT); return xchk_allocbt(sc, XFS_BTNUM_CNT);
} }
...@@ -151,7 +151,7 @@ xchk_cntbt( ...@@ -151,7 +151,7 @@ xchk_cntbt(
/* xref check that the extent is not free */ /* xref check that the extent is not free */
void void
xchk_xref_is_used_space( xchk_xref_is_used_space(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
/* Set us up to scrub an inode's extended attributes. */ /* Set us up to scrub an inode's extended attributes. */
int int
xchk_setup_xattr( xchk_setup_xattr(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
size_t sz; size_t sz;
...@@ -57,7 +57,7 @@ xchk_setup_xattr( ...@@ -57,7 +57,7 @@ xchk_setup_xattr(
struct xchk_xattr { struct xchk_xattr {
struct xfs_attr_list_context context; struct xfs_attr_list_context context;
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
}; };
/* /*
...@@ -127,7 +127,7 @@ xchk_xattr_listent( ...@@ -127,7 +127,7 @@ xchk_xattr_listent(
*/ */
STATIC bool STATIC bool
xchk_xattr_set_map( xchk_xattr_set_map(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
unsigned long *map, unsigned long *map,
unsigned int start, unsigned int start,
unsigned int len) unsigned int len)
...@@ -155,7 +155,7 @@ xchk_xattr_set_map( ...@@ -155,7 +155,7 @@ xchk_xattr_set_map(
*/ */
STATIC bool STATIC bool
xchk_xattr_check_freemap( xchk_xattr_check_freemap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
unsigned long *map, unsigned long *map,
struct xfs_attr3_icleaf_hdr *leafhdr) struct xfs_attr3_icleaf_hdr *leafhdr)
{ {
...@@ -405,7 +405,7 @@ xchk_xattr_rec( ...@@ -405,7 +405,7 @@ xchk_xattr_rec(
/* Scrub the extended attribute metadata. */ /* Scrub the extended attribute metadata. */
int int
xchk_xattr( xchk_xattr(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xchk_xattr sx; struct xchk_xattr sx;
struct attrlist_cursor_kern cursor = { 0 }; struct attrlist_cursor_kern cursor = { 0 };
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
/* Set us up with an inode's bmap. */ /* Set us up with an inode's bmap. */
int int
xchk_setup_inode_bmap( xchk_setup_inode_bmap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
int error; int error;
...@@ -79,7 +79,7 @@ xchk_setup_inode_bmap( ...@@ -79,7 +79,7 @@ xchk_setup_inode_bmap(
*/ */
struct xchk_bmap_info { struct xchk_bmap_info {
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
xfs_fileoff_t lastoff; xfs_fileoff_t lastoff;
bool is_rt; bool is_rt;
bool is_shared; bool is_shared;
...@@ -391,7 +391,7 @@ xchk_bmapbt_rec( ...@@ -391,7 +391,7 @@ xchk_bmapbt_rec(
/* Scan the btree records. */ /* Scan the btree records. */
STATIC int STATIC int
xchk_bmap_btree( xchk_bmap_btree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
struct xchk_bmap_info *info) struct xchk_bmap_info *info)
{ {
...@@ -409,7 +409,7 @@ xchk_bmap_btree( ...@@ -409,7 +409,7 @@ xchk_bmap_btree(
} }
struct xchk_bmap_check_rmap_info { struct xchk_bmap_check_rmap_info {
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
int whichfork; int whichfork;
struct xfs_iext_cursor icur; struct xfs_iext_cursor icur;
}; };
...@@ -424,7 +424,7 @@ xchk_bmap_check_rmap( ...@@ -424,7 +424,7 @@ xchk_bmap_check_rmap(
struct xfs_bmbt_irec irec; struct xfs_bmbt_irec irec;
struct xchk_bmap_check_rmap_info *sbcri = priv; struct xchk_bmap_check_rmap_info *sbcri = priv;
struct xfs_ifork *ifp; struct xfs_ifork *ifp;
struct xfs_scrub_context *sc = sbcri->sc; struct xfs_scrub *sc = sbcri->sc;
bool have_map; bool have_map;
/* Is this even the right fork? */ /* Is this even the right fork? */
...@@ -488,7 +488,7 @@ xchk_bmap_check_rmap( ...@@ -488,7 +488,7 @@ xchk_bmap_check_rmap(
/* Make sure each rmap has a corresponding bmbt entry. */ /* Make sure each rmap has a corresponding bmbt entry. */
STATIC int STATIC int
xchk_bmap_check_ag_rmaps( xchk_bmap_check_ag_rmaps(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_agnumber_t agno) xfs_agnumber_t agno)
{ {
...@@ -522,7 +522,7 @@ xchk_bmap_check_ag_rmaps( ...@@ -522,7 +522,7 @@ xchk_bmap_check_ag_rmaps(
/* Make sure each rmap has a corresponding bmbt entry. */ /* Make sure each rmap has a corresponding bmbt entry. */
STATIC int STATIC int
xchk_bmap_check_rmaps( xchk_bmap_check_rmaps(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork) int whichfork)
{ {
loff_t size; loff_t size;
...@@ -579,7 +579,7 @@ xchk_bmap_check_rmaps( ...@@ -579,7 +579,7 @@ xchk_bmap_check_rmaps(
*/ */
STATIC int STATIC int
xchk_bmap( xchk_bmap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork) int whichfork)
{ {
struct xfs_bmbt_irec irec; struct xfs_bmbt_irec irec;
...@@ -694,7 +694,7 @@ xchk_bmap( ...@@ -694,7 +694,7 @@ xchk_bmap(
/* Scrub an inode's data fork. */ /* Scrub an inode's data fork. */
int int
xchk_bmap_data( xchk_bmap_data(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_bmap(sc, XFS_DATA_FORK); return xchk_bmap(sc, XFS_DATA_FORK);
} }
...@@ -702,7 +702,7 @@ xchk_bmap_data( ...@@ -702,7 +702,7 @@ xchk_bmap_data(
/* Scrub an inode's attr fork. */ /* Scrub an inode's attr fork. */
int int
xchk_bmap_attr( xchk_bmap_attr(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_bmap(sc, XFS_ATTR_FORK); return xchk_bmap(sc, XFS_ATTR_FORK);
} }
...@@ -710,7 +710,7 @@ xchk_bmap_attr( ...@@ -710,7 +710,7 @@ xchk_bmap_attr(
/* Scrub an inode's CoW fork. */ /* Scrub an inode's CoW fork. */
int int
xchk_bmap_cow( xchk_bmap_cow(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
if (!xfs_is_reflink_inode(sc->ip)) if (!xfs_is_reflink_inode(sc->ip))
return -ENOENT; return -ENOENT;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
*/ */
static bool static bool
__xchk_btree_process_error( __xchk_btree_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
int *error, int *error,
...@@ -65,7 +65,7 @@ __xchk_btree_process_error( ...@@ -65,7 +65,7 @@ __xchk_btree_process_error(
bool bool
xchk_btree_process_error( xchk_btree_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
int *error) int *error)
...@@ -76,7 +76,7 @@ xchk_btree_process_error( ...@@ -76,7 +76,7 @@ xchk_btree_process_error(
bool bool
xchk_btree_xref_process_error( xchk_btree_xref_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
int *error) int *error)
...@@ -88,7 +88,7 @@ xchk_btree_xref_process_error( ...@@ -88,7 +88,7 @@ xchk_btree_xref_process_error(
/* Record btree block corruption. */ /* Record btree block corruption. */
static void static void
__xchk_btree_set_corrupt( __xchk_btree_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level, int level,
__u32 errflag, __u32 errflag,
...@@ -106,7 +106,7 @@ __xchk_btree_set_corrupt( ...@@ -106,7 +106,7 @@ __xchk_btree_set_corrupt(
void void
xchk_btree_set_corrupt( xchk_btree_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level) int level)
{ {
...@@ -116,7 +116,7 @@ xchk_btree_set_corrupt( ...@@ -116,7 +116,7 @@ xchk_btree_set_corrupt(
void void
xchk_btree_xref_set_corrupt( xchk_btree_xref_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
int level) int level)
{ {
...@@ -583,7 +583,7 @@ xchk_btree_block_keys( ...@@ -583,7 +583,7 @@ xchk_btree_block_keys(
*/ */
int int
xchk_btree( xchk_btree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
xchk_btree_rec_fn scrub_fn, xchk_btree_rec_fn scrub_fn,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
......
...@@ -9,20 +9,20 @@ ...@@ -9,20 +9,20 @@
/* btree scrub */ /* btree scrub */
/* Check for btree operation errors. */ /* Check for btree operation errors. */
bool xchk_btree_process_error(struct xfs_scrub_context *sc, bool xchk_btree_process_error(struct xfs_scrub *sc,
struct xfs_btree_cur *cur, int level, int *error); struct xfs_btree_cur *cur, int level, int *error);
/* Check for btree xref operation errors. */ /* Check for btree xref operation errors. */
bool xchk_btree_xref_process_error(struct xfs_scrub_context *sc, bool xchk_btree_xref_process_error(struct xfs_scrub *sc,
struct xfs_btree_cur *cur, int level, struct xfs_btree_cur *cur, int level,
int *error); int *error);
/* Check for btree corruption. */ /* Check for btree corruption. */
void xchk_btree_set_corrupt(struct xfs_scrub_context *sc, void xchk_btree_set_corrupt(struct xfs_scrub *sc,
struct xfs_btree_cur *cur, int level); struct xfs_btree_cur *cur, int level);
/* Check for btree xref discrepancies. */ /* Check for btree xref discrepancies. */
void xchk_btree_xref_set_corrupt(struct xfs_scrub_context *sc, void xchk_btree_xref_set_corrupt(struct xfs_scrub *sc,
struct xfs_btree_cur *cur, int level); struct xfs_btree_cur *cur, int level);
struct xchk_btree; struct xchk_btree;
...@@ -32,7 +32,7 @@ typedef int (*xchk_btree_rec_fn)( ...@@ -32,7 +32,7 @@ typedef int (*xchk_btree_rec_fn)(
struct xchk_btree { struct xchk_btree {
/* caller-provided scrub state */ /* caller-provided scrub state */
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
struct xfs_btree_cur *cur; struct xfs_btree_cur *cur;
xchk_btree_rec_fn scrub_rec; xchk_btree_rec_fn scrub_rec;
struct xfs_owner_info *oinfo; struct xfs_owner_info *oinfo;
...@@ -45,7 +45,7 @@ struct xchk_btree { ...@@ -45,7 +45,7 @@ struct xchk_btree {
bool firstkey[XFS_BTREE_MAXLEVELS]; bool firstkey[XFS_BTREE_MAXLEVELS];
struct list_head to_check; struct list_head to_check;
}; };
int xchk_btree(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, int xchk_btree(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
xchk_btree_rec_fn scrub_fn, xchk_btree_rec_fn scrub_fn,
struct xfs_owner_info *oinfo, void *private); struct xfs_owner_info *oinfo, void *private);
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
/* Check for operational errors. */ /* Check for operational errors. */
static bool static bool
__xchk_process_error( __xchk_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agnumber_t agno,
xfs_agblock_t bno, xfs_agblock_t bno,
int *error, int *error,
...@@ -99,7 +99,7 @@ __xchk_process_error( ...@@ -99,7 +99,7 @@ __xchk_process_error(
bool bool
xchk_process_error( xchk_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agnumber_t agno,
xfs_agblock_t bno, xfs_agblock_t bno,
int *error) int *error)
...@@ -110,7 +110,7 @@ xchk_process_error( ...@@ -110,7 +110,7 @@ xchk_process_error(
bool bool
xchk_xref_process_error( xchk_xref_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agnumber_t agno,
xfs_agblock_t bno, xfs_agblock_t bno,
int *error) int *error)
...@@ -122,7 +122,7 @@ xchk_xref_process_error( ...@@ -122,7 +122,7 @@ xchk_xref_process_error(
/* Check for operational errors for a file offset. */ /* Check for operational errors for a file offset. */
static bool static bool
__xchk_fblock_process_error( __xchk_fblock_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset, xfs_fileoff_t offset,
int *error, int *error,
...@@ -152,7 +152,7 @@ __xchk_fblock_process_error( ...@@ -152,7 +152,7 @@ __xchk_fblock_process_error(
bool bool
xchk_fblock_process_error( xchk_fblock_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset, xfs_fileoff_t offset,
int *error) int *error)
...@@ -163,7 +163,7 @@ xchk_fblock_process_error( ...@@ -163,7 +163,7 @@ xchk_fblock_process_error(
bool bool
xchk_fblock_xref_process_error( xchk_fblock_xref_process_error(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset, xfs_fileoff_t offset,
int *error) int *error)
...@@ -187,7 +187,7 @@ xchk_fblock_xref_process_error( ...@@ -187,7 +187,7 @@ xchk_fblock_xref_process_error(
/* Record a block which could be optimized. */ /* Record a block which could be optimized. */
void void
xchk_block_set_preen( xchk_block_set_preen(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN;
...@@ -201,7 +201,7 @@ xchk_block_set_preen( ...@@ -201,7 +201,7 @@ xchk_block_set_preen(
*/ */
void void
xchk_ino_set_preen( xchk_ino_set_preen(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_PREEN;
...@@ -211,7 +211,7 @@ xchk_ino_set_preen( ...@@ -211,7 +211,7 @@ xchk_ino_set_preen(
/* Record a corrupt block. */ /* Record a corrupt block. */
void void
xchk_block_set_corrupt( xchk_block_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
...@@ -221,7 +221,7 @@ xchk_block_set_corrupt( ...@@ -221,7 +221,7 @@ xchk_block_set_corrupt(
/* Record a corruption while cross-referencing. */ /* Record a corruption while cross-referencing. */
void void
xchk_block_xref_set_corrupt( xchk_block_xref_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT;
...@@ -235,7 +235,7 @@ xchk_block_xref_set_corrupt( ...@@ -235,7 +235,7 @@ xchk_block_xref_set_corrupt(
*/ */
void void
xchk_ino_set_corrupt( xchk_ino_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
...@@ -245,7 +245,7 @@ xchk_ino_set_corrupt( ...@@ -245,7 +245,7 @@ xchk_ino_set_corrupt(
/* Record a corruption while cross-referencing with an inode. */ /* Record a corruption while cross-referencing with an inode. */
void void
xchk_ino_xref_set_corrupt( xchk_ino_xref_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_XCORRUPT;
...@@ -255,7 +255,7 @@ xchk_ino_xref_set_corrupt( ...@@ -255,7 +255,7 @@ xchk_ino_xref_set_corrupt(
/* Record corruption in a block indexed by a file fork. */ /* Record corruption in a block indexed by a file fork. */
void void
xchk_fblock_set_corrupt( xchk_fblock_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset) xfs_fileoff_t offset)
{ {
...@@ -266,7 +266,7 @@ xchk_fblock_set_corrupt( ...@@ -266,7 +266,7 @@ xchk_fblock_set_corrupt(
/* Record a corruption while cross-referencing a fork block. */ /* Record a corruption while cross-referencing a fork block. */
void void
xchk_fblock_xref_set_corrupt( xchk_fblock_xref_set_corrupt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset) xfs_fileoff_t offset)
{ {
...@@ -280,7 +280,7 @@ xchk_fblock_xref_set_corrupt( ...@@ -280,7 +280,7 @@ xchk_fblock_xref_set_corrupt(
*/ */
void void
xchk_ino_set_warning( xchk_ino_set_warning(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_WARNING; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_WARNING;
...@@ -290,7 +290,7 @@ xchk_ino_set_warning( ...@@ -290,7 +290,7 @@ xchk_ino_set_warning(
/* Warn about a block indexed by a file fork that needs review. */ /* Warn about a block indexed by a file fork that needs review. */
void void
xchk_fblock_set_warning( xchk_fblock_set_warning(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xfs_fileoff_t offset) xfs_fileoff_t offset)
{ {
...@@ -301,7 +301,7 @@ xchk_fblock_set_warning( ...@@ -301,7 +301,7 @@ xchk_fblock_set_warning(
/* Signal an incomplete scrub. */ /* Signal an incomplete scrub. */
void void
xchk_set_incomplete( xchk_set_incomplete(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_INCOMPLETE; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_INCOMPLETE;
trace_xchk_incomplete(sc, __return_address); trace_xchk_incomplete(sc, __return_address);
...@@ -345,7 +345,7 @@ xchk_count_rmap_ownedby_irec( ...@@ -345,7 +345,7 @@ xchk_count_rmap_ownedby_irec(
*/ */
int int
xchk_count_rmap_ownedby_ag( xchk_count_rmap_ownedby_ag(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
xfs_filblks_t *blocks) xfs_filblks_t *blocks)
...@@ -371,7 +371,7 @@ xchk_count_rmap_ownedby_ag( ...@@ -371,7 +371,7 @@ xchk_count_rmap_ownedby_ag(
/* Decide if we want to return an AG header read failure. */ /* Decide if we want to return an AG header read failure. */
static inline bool static inline bool
want_ag_read_header_failure( want_ag_read_header_failure(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
unsigned int type) unsigned int type)
{ {
/* Return all AG header read failures when scanning btrees. */ /* Return all AG header read failures when scanning btrees. */
...@@ -398,7 +398,7 @@ want_ag_read_header_failure( ...@@ -398,7 +398,7 @@ want_ag_read_header_failure(
*/ */
int int
xchk_ag_read_headers( xchk_ag_read_headers(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agnumber_t agno,
struct xfs_buf **agi, struct xfs_buf **agi,
struct xfs_buf **agf, struct xfs_buf **agf,
...@@ -452,7 +452,7 @@ xchk_ag_btcur_free( ...@@ -452,7 +452,7 @@ xchk_ag_btcur_free(
/* Initialize all the btree cursors for an AG. */ /* Initialize all the btree cursors for an AG. */
int int
xchk_ag_btcur_init( xchk_ag_btcur_init(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xchk_ag *sa) struct xchk_ag *sa)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -512,7 +512,7 @@ xchk_ag_btcur_init( ...@@ -512,7 +512,7 @@ xchk_ag_btcur_init(
/* Release the AG header context and btree cursors. */ /* Release the AG header context and btree cursors. */
void void
xchk_ag_free( xchk_ag_free(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xchk_ag *sa) struct xchk_ag *sa)
{ {
xchk_ag_btcur_free(sa); xchk_ag_btcur_free(sa);
...@@ -544,7 +544,7 @@ xchk_ag_free( ...@@ -544,7 +544,7 @@ xchk_ag_free(
*/ */
int int
xchk_ag_init( xchk_ag_init(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agnumber_t agno,
struct xchk_ag *sa) struct xchk_ag *sa)
{ {
...@@ -586,7 +586,7 @@ xchk_perag_get( ...@@ -586,7 +586,7 @@ xchk_perag_get(
*/ */
int int
xchk_trans_alloc( xchk_trans_alloc(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
uint resblks) uint resblks)
{ {
if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)
...@@ -599,7 +599,7 @@ xchk_trans_alloc( ...@@ -599,7 +599,7 @@ xchk_trans_alloc(
/* Set us up with a transaction and an empty context. */ /* Set us up with a transaction and an empty context. */
int int
xchk_setup_fs( xchk_setup_fs(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
uint resblks; uint resblks;
...@@ -611,7 +611,7 @@ xchk_setup_fs( ...@@ -611,7 +611,7 @@ xchk_setup_fs(
/* Set us up with AG headers and btree cursors. */ /* Set us up with AG headers and btree cursors. */
int int
xchk_setup_ag_btree( xchk_setup_ag_btree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip, struct xfs_inode *ip,
bool force_log) bool force_log)
{ {
...@@ -658,7 +658,7 @@ xchk_checkpoint_log( ...@@ -658,7 +658,7 @@ xchk_checkpoint_log(
*/ */
int int
xchk_get_inode( xchk_get_inode(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip_in) struct xfs_inode *ip_in)
{ {
struct xfs_imap imap; struct xfs_imap imap;
...@@ -722,7 +722,7 @@ xchk_get_inode( ...@@ -722,7 +722,7 @@ xchk_get_inode(
/* Set us up to scrub a file's contents. */ /* Set us up to scrub a file's contents. */
int int
xchk_setup_inode_contents( xchk_setup_inode_contents(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip, struct xfs_inode *ip,
unsigned int resblks) unsigned int resblks)
{ {
...@@ -753,7 +753,7 @@ xchk_setup_inode_contents( ...@@ -753,7 +753,7 @@ xchk_setup_inode_contents(
*/ */
bool bool
xchk_should_check_xref( xchk_should_check_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int *error, int *error,
struct xfs_btree_cur **curpp) struct xfs_btree_cur **curpp)
{ {
...@@ -788,7 +788,7 @@ xchk_should_check_xref( ...@@ -788,7 +788,7 @@ xchk_should_check_xref(
/* Run the structure verifiers on in-memory buffers to detect bad memory. */ /* Run the structure verifiers on in-memory buffers to detect bad memory. */
void void
xchk_buffer_recheck( xchk_buffer_recheck(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *bp) struct xfs_buf *bp)
{ {
xfs_failaddr_t fa; xfs_failaddr_t fa;
...@@ -814,7 +814,7 @@ xchk_buffer_recheck( ...@@ -814,7 +814,7 @@ xchk_buffer_recheck(
*/ */
int int
xchk_metadata_inode_forks( xchk_metadata_inode_forks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
__u32 smtype; __u32 smtype;
bool shared; bool shared;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
*/ */
static inline bool static inline bool
xchk_should_terminate( xchk_should_terminate(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int *error) int *error)
{ {
if (fatal_signal_pending(current)) { if (fatal_signal_pending(current)) {
...@@ -24,109 +24,109 @@ xchk_should_terminate( ...@@ -24,109 +24,109 @@ xchk_should_terminate(
return false; return false;
} }
int xchk_trans_alloc(struct xfs_scrub_context *sc, uint resblks); int xchk_trans_alloc(struct xfs_scrub *sc, uint resblks);
bool xchk_process_error(struct xfs_scrub_context *sc, xfs_agnumber_t agno, bool xchk_process_error(struct xfs_scrub *sc, xfs_agnumber_t agno,
xfs_agblock_t bno, int *error); xfs_agblock_t bno, int *error);
bool xchk_fblock_process_error(struct xfs_scrub_context *sc, int whichfork, bool xchk_fblock_process_error(struct xfs_scrub *sc, int whichfork,
xfs_fileoff_t offset, int *error); xfs_fileoff_t offset, int *error);
bool xchk_xref_process_error(struct xfs_scrub_context *sc, bool xchk_xref_process_error(struct xfs_scrub *sc,
xfs_agnumber_t agno, xfs_agblock_t bno, int *error); xfs_agnumber_t agno, xfs_agblock_t bno, int *error);
bool xchk_fblock_xref_process_error(struct xfs_scrub_context *sc, bool xchk_fblock_xref_process_error(struct xfs_scrub *sc,
int whichfork, xfs_fileoff_t offset, int *error); int whichfork, xfs_fileoff_t offset, int *error);
void xchk_block_set_preen(struct xfs_scrub_context *sc, void xchk_block_set_preen(struct xfs_scrub *sc,
struct xfs_buf *bp); struct xfs_buf *bp);
void xchk_ino_set_preen(struct xfs_scrub_context *sc, xfs_ino_t ino); void xchk_ino_set_preen(struct xfs_scrub *sc, xfs_ino_t ino);
void xchk_block_set_corrupt(struct xfs_scrub_context *sc, void xchk_block_set_corrupt(struct xfs_scrub *sc,
struct xfs_buf *bp); struct xfs_buf *bp);
void xchk_ino_set_corrupt(struct xfs_scrub_context *sc, xfs_ino_t ino); void xchk_ino_set_corrupt(struct xfs_scrub *sc, xfs_ino_t ino);
void xchk_fblock_set_corrupt(struct xfs_scrub_context *sc, int whichfork, void xchk_fblock_set_corrupt(struct xfs_scrub *sc, int whichfork,
xfs_fileoff_t offset); xfs_fileoff_t offset);
void xchk_block_xref_set_corrupt(struct xfs_scrub_context *sc, void xchk_block_xref_set_corrupt(struct xfs_scrub *sc,
struct xfs_buf *bp); struct xfs_buf *bp);
void xchk_ino_xref_set_corrupt(struct xfs_scrub_context *sc, void xchk_ino_xref_set_corrupt(struct xfs_scrub *sc,
xfs_ino_t ino); xfs_ino_t ino);
void xchk_fblock_xref_set_corrupt(struct xfs_scrub_context *sc, void xchk_fblock_xref_set_corrupt(struct xfs_scrub *sc,
int whichfork, xfs_fileoff_t offset); int whichfork, xfs_fileoff_t offset);
void xchk_ino_set_warning(struct xfs_scrub_context *sc, xfs_ino_t ino); void xchk_ino_set_warning(struct xfs_scrub *sc, xfs_ino_t ino);
void xchk_fblock_set_warning(struct xfs_scrub_context *sc, int whichfork, void xchk_fblock_set_warning(struct xfs_scrub *sc, int whichfork,
xfs_fileoff_t offset); xfs_fileoff_t offset);
void xchk_set_incomplete(struct xfs_scrub_context *sc); void xchk_set_incomplete(struct xfs_scrub *sc);
int xchk_checkpoint_log(struct xfs_mount *mp); int xchk_checkpoint_log(struct xfs_mount *mp);
/* Are we set up for a cross-referencing check? */ /* Are we set up for a cross-referencing check? */
bool xchk_should_check_xref(struct xfs_scrub_context *sc, int *error, bool xchk_should_check_xref(struct xfs_scrub *sc, int *error,
struct xfs_btree_cur **curpp); struct xfs_btree_cur **curpp);
/* Setup functions */ /* Setup functions */
int xchk_setup_fs(struct xfs_scrub_context *sc, struct xfs_inode *ip); int xchk_setup_fs(struct xfs_scrub *sc, struct xfs_inode *ip);
int xchk_setup_ag_allocbt(struct xfs_scrub_context *sc, int xchk_setup_ag_allocbt(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_ag_iallocbt(struct xfs_scrub_context *sc, int xchk_setup_ag_iallocbt(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_ag_rmapbt(struct xfs_scrub_context *sc, int xchk_setup_ag_rmapbt(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_ag_refcountbt(struct xfs_scrub_context *sc, int xchk_setup_ag_refcountbt(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_inode(struct xfs_scrub_context *sc, int xchk_setup_inode(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_inode_bmap(struct xfs_scrub_context *sc, int xchk_setup_inode_bmap(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_inode_bmap_data(struct xfs_scrub_context *sc, int xchk_setup_inode_bmap_data(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_directory(struct xfs_scrub_context *sc, int xchk_setup_directory(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_xattr(struct xfs_scrub_context *sc, int xchk_setup_xattr(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_symlink(struct xfs_scrub_context *sc, int xchk_setup_symlink(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
int xchk_setup_parent(struct xfs_scrub_context *sc, int xchk_setup_parent(struct xfs_scrub *sc,
struct xfs_inode *ip); struct xfs_inode *ip);
#ifdef CONFIG_XFS_RT #ifdef CONFIG_XFS_RT
int xchk_setup_rt(struct xfs_scrub_context *sc, struct xfs_inode *ip); int xchk_setup_rt(struct xfs_scrub *sc, struct xfs_inode *ip);
#else #else
static inline int static inline int
xchk_setup_rt(struct xfs_scrub_context *sc, struct xfs_inode *ip) xchk_setup_rt(struct xfs_scrub *sc, struct xfs_inode *ip)
{ {
return -ENOENT; return -ENOENT;
} }
#endif #endif
#ifdef CONFIG_XFS_QUOTA #ifdef CONFIG_XFS_QUOTA
int xchk_setup_quota(struct xfs_scrub_context *sc, struct xfs_inode *ip); int xchk_setup_quota(struct xfs_scrub *sc, struct xfs_inode *ip);
#else #else
static inline int static inline int
xchk_setup_quota(struct xfs_scrub_context *sc, struct xfs_inode *ip) xchk_setup_quota(struct xfs_scrub *sc, struct xfs_inode *ip)
{ {
return -ENOENT; return -ENOENT;
} }
#endif #endif
void xchk_ag_free(struct xfs_scrub_context *sc, struct xchk_ag *sa); void xchk_ag_free(struct xfs_scrub *sc, struct xchk_ag *sa);
int xchk_ag_init(struct xfs_scrub_context *sc, xfs_agnumber_t agno, int xchk_ag_init(struct xfs_scrub *sc, xfs_agnumber_t agno,
struct xchk_ag *sa); struct xchk_ag *sa);
void xchk_perag_get(struct xfs_mount *mp, struct xchk_ag *sa); void xchk_perag_get(struct xfs_mount *mp, struct xchk_ag *sa);
int xchk_ag_read_headers(struct xfs_scrub_context *sc, xfs_agnumber_t agno, int xchk_ag_read_headers(struct xfs_scrub *sc, xfs_agnumber_t agno,
struct xfs_buf **agi, struct xfs_buf **agf, struct xfs_buf **agi, struct xfs_buf **agf,
struct xfs_buf **agfl); struct xfs_buf **agfl);
void xchk_ag_btcur_free(struct xchk_ag *sa); void xchk_ag_btcur_free(struct xchk_ag *sa);
int xchk_ag_btcur_init(struct xfs_scrub_context *sc, int xchk_ag_btcur_init(struct xfs_scrub *sc,
struct xchk_ag *sa); struct xchk_ag *sa);
int xchk_count_rmap_ownedby_ag(struct xfs_scrub_context *sc, int xchk_count_rmap_ownedby_ag(struct xfs_scrub *sc,
struct xfs_btree_cur *cur, struct xfs_btree_cur *cur,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
xfs_filblks_t *blocks); xfs_filblks_t *blocks);
int xchk_setup_ag_btree(struct xfs_scrub_context *sc, int xchk_setup_ag_btree(struct xfs_scrub *sc,
struct xfs_inode *ip, bool force_log); struct xfs_inode *ip, bool force_log);
int xchk_get_inode(struct xfs_scrub_context *sc, struct xfs_inode *ip_in); int xchk_get_inode(struct xfs_scrub *sc, struct xfs_inode *ip_in);
int xchk_setup_inode_contents(struct xfs_scrub_context *sc, int xchk_setup_inode_contents(struct xfs_scrub *sc,
struct xfs_inode *ip, unsigned int resblks); struct xfs_inode *ip, unsigned int resblks);
void xchk_buffer_recheck(struct xfs_scrub_context *sc, struct xfs_buf *bp); void xchk_buffer_recheck(struct xfs_scrub *sc, struct xfs_buf *bp);
/* /*
* Don't bother cross-referencing if we already found corruption or cross * 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,7 +138,7 @@ static inline bool xchk_skip_xref(struct xfs_scrub_metadata *sm)
XFS_SCRUB_OFLAG_XCORRUPT); XFS_SCRUB_OFLAG_XCORRUPT);
} }
int xchk_metadata_inode_forks(struct xfs_scrub_context *sc); int xchk_metadata_inode_forks(struct xfs_scrub *sc);
int xchk_ilock_inverted(struct xfs_inode *ip, uint lock_mode); int xchk_ilock_inverted(struct xfs_inode *ip, uint lock_mode);
#endif /* __XFS_SCRUB_COMMON_H__ */ #endif /* __XFS_SCRUB_COMMON_H__ */
...@@ -40,7 +40,7 @@ xchk_da_process_error( ...@@ -40,7 +40,7 @@ xchk_da_process_error(
int level, int level,
int *error) int *error)
{ {
struct xfs_scrub_context *sc = ds->sc; struct xfs_scrub *sc = ds->sc;
if (*error == 0) if (*error == 0)
return true; return true;
...@@ -75,7 +75,7 @@ xchk_da_set_corrupt( ...@@ -75,7 +75,7 @@ xchk_da_set_corrupt(
struct xchk_da_btree *ds, struct xchk_da_btree *ds,
int level) int level)
{ {
struct xfs_scrub_context *sc = ds->sc; struct xfs_scrub *sc = ds->sc;
sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT;
...@@ -474,7 +474,7 @@ xchk_da_btree_block( ...@@ -474,7 +474,7 @@ xchk_da_btree_block(
/* Visit all nodes and leaves of a da btree. */ /* Visit all nodes and leaves of a da btree. */
int int
xchk_da_btree( xchk_da_btree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int whichfork, int whichfork,
xchk_da_btree_rec_fn scrub_fn, xchk_da_btree_rec_fn scrub_fn,
void *private) void *private)
......
...@@ -13,7 +13,7 @@ struct xchk_da_btree { ...@@ -13,7 +13,7 @@ struct xchk_da_btree {
xfs_dahash_t hashes[XFS_DA_NODE_MAXDEPTH]; xfs_dahash_t hashes[XFS_DA_NODE_MAXDEPTH];
int maxrecs[XFS_DA_NODE_MAXDEPTH]; int maxrecs[XFS_DA_NODE_MAXDEPTH];
struct xfs_da_state *state; struct xfs_da_state *state;
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
void *private; void *private;
/* /*
...@@ -39,7 +39,7 @@ void xchk_da_set_corrupt(struct xchk_da_btree *ds, int level); ...@@ -39,7 +39,7 @@ void xchk_da_set_corrupt(struct xchk_da_btree *ds, int level);
int xchk_da_btree_hash(struct xchk_da_btree *ds, int level, int xchk_da_btree_hash(struct xchk_da_btree *ds, int level,
__be32 *hashp); __be32 *hashp);
int xchk_da_btree(struct xfs_scrub_context *sc, int whichfork, int xchk_da_btree(struct xfs_scrub *sc, int whichfork,
xchk_da_btree_rec_fn scrub_fn, void *private); xchk_da_btree_rec_fn scrub_fn, void *private);
#endif /* __XFS_SCRUB_DABTREE_H__ */ #endif /* __XFS_SCRUB_DABTREE_H__ */
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
/* Set us up to scrub directories. */ /* Set us up to scrub directories. */
int int
xchk_setup_directory( xchk_setup_directory(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_inode_contents(sc, ip, 0); return xchk_setup_inode_contents(sc, ip, 0);
...@@ -46,7 +46,7 @@ struct xchk_dir_ctx { ...@@ -46,7 +46,7 @@ struct xchk_dir_ctx {
/* VFS fill-directory iterator */ /* VFS fill-directory iterator */
struct dir_context dir_iter; struct dir_context dir_iter;
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
}; };
/* Check that an inode's mode matches a given DT_ type. */ /* Check that an inode's mode matches a given DT_ type. */
...@@ -289,7 +289,7 @@ xchk_dir_rec( ...@@ -289,7 +289,7 @@ xchk_dir_rec(
*/ */
STATIC void STATIC void
xchk_directory_check_free_entry( xchk_directory_check_free_entry(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_dablk_t lblk, xfs_dablk_t lblk,
struct xfs_dir2_data_free *bf, struct xfs_dir2_data_free *bf,
struct xfs_dir2_data_unused *dup) struct xfs_dir2_data_unused *dup)
...@@ -314,7 +314,7 @@ xchk_directory_check_free_entry( ...@@ -314,7 +314,7 @@ xchk_directory_check_free_entry(
/* Check free space info in a directory data block. */ /* Check free space info in a directory data block. */
STATIC int STATIC int
xchk_directory_data_bestfree( xchk_directory_data_bestfree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_dablk_t lblk, xfs_dablk_t lblk,
bool is_block) bool is_block)
{ {
...@@ -455,7 +455,7 @@ xchk_directory_data_bestfree( ...@@ -455,7 +455,7 @@ xchk_directory_data_bestfree(
*/ */
STATIC void STATIC void
xchk_directory_check_freesp( xchk_directory_check_freesp(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_dablk_t lblk, xfs_dablk_t lblk,
struct xfs_buf *dbp, struct xfs_buf *dbp,
unsigned int len) unsigned int len)
...@@ -474,7 +474,7 @@ xchk_directory_check_freesp( ...@@ -474,7 +474,7 @@ xchk_directory_check_freesp(
/* Check free space info in a directory leaf1 block. */ /* Check free space info in a directory leaf1 block. */
STATIC int STATIC int
xchk_directory_leaf1_bestfree( xchk_directory_leaf1_bestfree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_da_args *args, struct xfs_da_args *args,
xfs_dablk_t lblk) xfs_dablk_t lblk)
{ {
...@@ -572,7 +572,7 @@ xchk_directory_leaf1_bestfree( ...@@ -572,7 +572,7 @@ xchk_directory_leaf1_bestfree(
/* Check free space info in a directory freespace block. */ /* Check free space info in a directory freespace block. */
STATIC int STATIC int
xchk_directory_free_bestfree( xchk_directory_free_bestfree(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_da_args *args, struct xfs_da_args *args,
xfs_dablk_t lblk) xfs_dablk_t lblk)
{ {
...@@ -626,7 +626,7 @@ xchk_directory_free_bestfree( ...@@ -626,7 +626,7 @@ xchk_directory_free_bestfree(
/* Check free space information in directories. */ /* Check free space information in directories. */
STATIC int STATIC int
xchk_directory_blocks( xchk_directory_blocks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_bmbt_irec got; struct xfs_bmbt_irec got;
struct xfs_da_args args; struct xfs_da_args args;
...@@ -770,7 +770,7 @@ xchk_directory_blocks( ...@@ -770,7 +770,7 @@ xchk_directory_blocks(
/* Scrub a whole directory. */ /* Scrub a whole directory. */
int int
xchk_directory( xchk_directory(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xchk_dir_ctx sdc = { struct xchk_dir_ctx sdc = {
.dir_iter.actor = xchk_dir_actor, .dir_iter.actor = xchk_dir_actor,
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
*/ */
int int
xchk_setup_ag_iallocbt( xchk_setup_ag_iallocbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_ag_btree(sc, ip, sc->try_harder); return xchk_setup_ag_btree(sc, ip, sc->try_harder);
...@@ -51,7 +51,7 @@ xchk_setup_ag_iallocbt( ...@@ -51,7 +51,7 @@ xchk_setup_ag_iallocbt(
*/ */
static inline void static inline void
xchk_iallocbt_chunk_xref_other( xchk_iallocbt_chunk_xref_other(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inobt_rec_incore *irec, struct xfs_inobt_rec_incore *irec,
xfs_agino_t agino) xfs_agino_t agino)
{ {
...@@ -76,7 +76,7 @@ xchk_iallocbt_chunk_xref_other( ...@@ -76,7 +76,7 @@ xchk_iallocbt_chunk_xref_other(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_iallocbt_chunk_xref( xchk_iallocbt_chunk_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inobt_rec_incore *irec, struct xfs_inobt_rec_incore *irec,
xfs_agino_t agino, xfs_agino_t agino,
xfs_agblock_t agbno, xfs_agblock_t agbno,
...@@ -363,7 +363,7 @@ xchk_iallocbt_rec( ...@@ -363,7 +363,7 @@ xchk_iallocbt_rec(
*/ */
STATIC void STATIC void
xchk_iallocbt_xref_rmap_btreeblks( xchk_iallocbt_xref_rmap_btreeblks(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int which) int which)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
...@@ -403,7 +403,7 @@ xchk_iallocbt_xref_rmap_btreeblks( ...@@ -403,7 +403,7 @@ xchk_iallocbt_xref_rmap_btreeblks(
*/ */
STATIC void STATIC void
xchk_iallocbt_xref_rmap_inodes( xchk_iallocbt_xref_rmap_inodes(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
int which, int which,
xfs_filblks_t inode_blocks) xfs_filblks_t inode_blocks)
{ {
...@@ -427,7 +427,7 @@ xchk_iallocbt_xref_rmap_inodes( ...@@ -427,7 +427,7 @@ xchk_iallocbt_xref_rmap_inodes(
/* Scrub the inode btrees for some AG. */ /* Scrub the inode btrees for some AG. */
STATIC int STATIC int
xchk_iallocbt( xchk_iallocbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_btnum_t which) xfs_btnum_t which)
{ {
struct xfs_btree_cur *cur; struct xfs_btree_cur *cur;
...@@ -459,14 +459,14 @@ xchk_iallocbt( ...@@ -459,14 +459,14 @@ xchk_iallocbt(
int int
xchk_inobt( xchk_inobt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_iallocbt(sc, XFS_BTNUM_INO); return xchk_iallocbt(sc, XFS_BTNUM_INO);
} }
int int
xchk_finobt( xchk_finobt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
return xchk_iallocbt(sc, XFS_BTNUM_FINO); return xchk_iallocbt(sc, XFS_BTNUM_FINO);
} }
...@@ -474,7 +474,7 @@ xchk_finobt( ...@@ -474,7 +474,7 @@ xchk_finobt(
/* See if an inode btree has (or doesn't have) an inode chunk record. */ /* See if an inode btree has (or doesn't have) an inode chunk record. */
static inline void static inline void
xchk_xref_inode_check( xchk_xref_inode_check(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len, xfs_extlen_t len,
struct xfs_btree_cur **icur, struct xfs_btree_cur **icur,
...@@ -496,7 +496,7 @@ xchk_xref_inode_check( ...@@ -496,7 +496,7 @@ xchk_xref_inode_check(
/* xref check that the extent is not covered by inodes */ /* xref check that the extent is not covered by inodes */
void void
xchk_xref_is_not_inode_chunk( xchk_xref_is_not_inode_chunk(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
...@@ -507,7 +507,7 @@ xchk_xref_is_not_inode_chunk( ...@@ -507,7 +507,7 @@ xchk_xref_is_not_inode_chunk(
/* xref check that the extent is covered by inodes */ /* xref check that the extent is covered by inodes */
void void
xchk_xref_is_inode_chunk( xchk_xref_is_inode_chunk(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
*/ */
int int
xchk_setup_inode( xchk_setup_inode(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
int error; int error;
...@@ -77,7 +77,7 @@ xchk_setup_inode( ...@@ -77,7 +77,7 @@ xchk_setup_inode(
/* Validate di_extsize hint. */ /* Validate di_extsize hint. */
STATIC void STATIC void
xchk_inode_extsize( xchk_inode_extsize(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip, struct xfs_dinode *dip,
xfs_ino_t ino, xfs_ino_t ino,
uint16_t mode, uint16_t mode,
...@@ -99,7 +99,7 @@ xchk_inode_extsize( ...@@ -99,7 +99,7 @@ xchk_inode_extsize(
*/ */
STATIC void STATIC void
xchk_inode_cowextsize( xchk_inode_cowextsize(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip, struct xfs_dinode *dip,
xfs_ino_t ino, xfs_ino_t ino,
uint16_t mode, uint16_t mode,
...@@ -118,7 +118,7 @@ xchk_inode_cowextsize( ...@@ -118,7 +118,7 @@ xchk_inode_cowextsize(
/* Make sure the di_flags make sense for the inode. */ /* Make sure the di_flags make sense for the inode. */
STATIC void STATIC void
xchk_inode_flags( xchk_inode_flags(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip, struct xfs_dinode *dip,
xfs_ino_t ino, xfs_ino_t ino,
uint16_t mode, uint16_t mode,
...@@ -163,7 +163,7 @@ xchk_inode_flags( ...@@ -163,7 +163,7 @@ xchk_inode_flags(
/* Make sure the di_flags2 make sense for the inode. */ /* Make sure the di_flags2 make sense for the inode. */
STATIC void STATIC void
xchk_inode_flags2( xchk_inode_flags2(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip, struct xfs_dinode *dip,
xfs_ino_t ino, xfs_ino_t ino,
uint16_t mode, uint16_t mode,
...@@ -206,7 +206,7 @@ xchk_inode_flags2( ...@@ -206,7 +206,7 @@ xchk_inode_flags2(
/* Scrub all the ondisk inode fields. */ /* Scrub all the ondisk inode fields. */
STATIC void STATIC void
xchk_dinode( xchk_dinode(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip, struct xfs_dinode *dip,
xfs_ino_t ino) xfs_ino_t ino)
{ {
...@@ -426,7 +426,7 @@ xchk_dinode( ...@@ -426,7 +426,7 @@ xchk_dinode(
*/ */
static void static void
xchk_inode_xref_finobt( xchk_inode_xref_finobt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
struct xfs_inobt_rec_incore rec; struct xfs_inobt_rec_incore rec;
...@@ -469,7 +469,7 @@ xchk_inode_xref_finobt( ...@@ -469,7 +469,7 @@ xchk_inode_xref_finobt(
/* Cross reference the inode fields with the forks. */ /* Cross reference the inode fields with the forks. */
STATIC void STATIC void
xchk_inode_xref_bmap( xchk_inode_xref_bmap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_dinode *dip) struct xfs_dinode *dip)
{ {
xfs_extnum_t nextents; xfs_extnum_t nextents;
...@@ -503,7 +503,7 @@ xchk_inode_xref_bmap( ...@@ -503,7 +503,7 @@ xchk_inode_xref_bmap(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_inode_xref( xchk_inode_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino, xfs_ino_t ino,
struct xfs_dinode *dip) struct xfs_dinode *dip)
{ {
...@@ -540,7 +540,7 @@ xchk_inode_xref( ...@@ -540,7 +540,7 @@ xchk_inode_xref(
*/ */
static void static void
xchk_inode_check_reflink_iflag( xchk_inode_check_reflink_iflag(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t ino) xfs_ino_t ino)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
...@@ -564,7 +564,7 @@ xchk_inode_check_reflink_iflag( ...@@ -564,7 +564,7 @@ xchk_inode_check_reflink_iflag(
/* Scrub an inode. */ /* Scrub an inode. */
int int
xchk_inode( xchk_inode(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_dinode di; struct xfs_dinode di;
int error = 0; int error = 0;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
/* Set us up to scrub parents. */ /* Set us up to scrub parents. */
int int
xchk_setup_parent( xchk_setup_parent(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_inode_contents(sc, ip, 0); return xchk_setup_inode_contents(sc, ip, 0);
...@@ -65,7 +65,7 @@ xchk_parent_actor( ...@@ -65,7 +65,7 @@ xchk_parent_actor(
/* Count the number of dentries in the parent dir that point to this inode. */ /* Count the number of dentries in the parent dir that point to this inode. */
STATIC int STATIC int
xchk_parent_count_parent_dentries( xchk_parent_count_parent_dentries(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *parent, struct xfs_inode *parent,
xfs_nlink_t *nlink) xfs_nlink_t *nlink)
{ {
...@@ -121,7 +121,7 @@ xchk_parent_count_parent_dentries( ...@@ -121,7 +121,7 @@ xchk_parent_count_parent_dentries(
*/ */
STATIC int STATIC int
xchk_parent_validate( xchk_parent_validate(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_ino_t dnum, xfs_ino_t dnum,
bool *try_again) bool *try_again)
{ {
...@@ -255,7 +255,7 @@ xchk_parent_validate( ...@@ -255,7 +255,7 @@ xchk_parent_validate(
/* Scrub a parent pointer. */ /* Scrub a parent pointer. */
int int
xchk_parent( xchk_parent(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
xfs_ino_t dnum; xfs_ino_t dnum;
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
/* Convert a scrub type code to a DQ flag, or return 0 if error. */ /* Convert a scrub type code to a DQ flag, or return 0 if error. */
static inline uint static inline uint
xchk_quota_to_dqtype( xchk_quota_to_dqtype(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
switch (sc->sm->sm_type) { switch (sc->sm->sm_type) {
case XFS_SCRUB_TYPE_UQUOTA: case XFS_SCRUB_TYPE_UQUOTA:
...@@ -48,7 +48,7 @@ xchk_quota_to_dqtype( ...@@ -48,7 +48,7 @@ xchk_quota_to_dqtype(
/* Set us up to scrub a quota. */ /* Set us up to scrub a quota. */
int int
xchk_setup_quota( xchk_setup_quota(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
uint dqtype; uint dqtype;
...@@ -76,7 +76,7 @@ xchk_setup_quota( ...@@ -76,7 +76,7 @@ xchk_setup_quota(
/* Quotas. */ /* Quotas. */
struct xchk_quota_info { struct xchk_quota_info {
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
xfs_dqid_t last_id; xfs_dqid_t last_id;
}; };
...@@ -88,7 +88,7 @@ xchk_quota_item( ...@@ -88,7 +88,7 @@ xchk_quota_item(
void *priv) void *priv)
{ {
struct xchk_quota_info *sqi = priv; struct xchk_quota_info *sqi = priv;
struct xfs_scrub_context *sc = sqi->sc; struct xfs_scrub *sc = sqi->sc;
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_disk_dquot *d = &dq->q_core; struct xfs_disk_dquot *d = &dq->q_core;
struct xfs_quotainfo *qi = mp->m_quotainfo; struct xfs_quotainfo *qi = mp->m_quotainfo;
...@@ -195,7 +195,7 @@ xchk_quota_item( ...@@ -195,7 +195,7 @@ xchk_quota_item(
/* Check the quota's data fork. */ /* Check the quota's data fork. */
STATIC int STATIC int
xchk_quota_data_fork( xchk_quota_data_fork(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_bmbt_irec irec = { 0 }; struct xfs_bmbt_irec irec = { 0 };
struct xfs_iext_cursor icur; struct xfs_iext_cursor icur;
...@@ -234,7 +234,7 @@ xchk_quota_data_fork( ...@@ -234,7 +234,7 @@ xchk_quota_data_fork(
/* Scrub all of a quota type's items. */ /* Scrub all of a quota type's items. */
int int
xchk_quota( xchk_quota(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xchk_quota_info sqi; struct xchk_quota_info sqi;
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
*/ */
int int
xchk_setup_ag_refcountbt( xchk_setup_ag_refcountbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_ag_btree(sc, ip, false); return xchk_setup_ag_btree(sc, ip, false);
...@@ -79,7 +79,7 @@ struct xchk_refcnt_frag { ...@@ -79,7 +79,7 @@ struct xchk_refcnt_frag {
}; };
struct xchk_refcnt_check { struct xchk_refcnt_check {
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
struct list_head fragments; struct list_head fragments;
/* refcount extent we're examining */ /* refcount extent we're examining */
...@@ -278,7 +278,7 @@ xchk_refcountbt_process_rmap_fragments( ...@@ -278,7 +278,7 @@ xchk_refcountbt_process_rmap_fragments(
/* Use the rmap entries covering this extent to verify the refcount. */ /* Use the rmap entries covering this extent to verify the refcount. */
STATIC void STATIC void
xchk_refcountbt_xref_rmap( xchk_refcountbt_xref_rmap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_agblock_t bno,
xfs_extlen_t len, xfs_extlen_t len,
xfs_nlink_t refcount) xfs_nlink_t refcount)
...@@ -325,7 +325,7 @@ xchk_refcountbt_xref_rmap( ...@@ -325,7 +325,7 @@ xchk_refcountbt_xref_rmap(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_refcountbt_xref( xchk_refcountbt_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len, xfs_extlen_t len,
xfs_nlink_t refcount) xfs_nlink_t refcount)
...@@ -382,7 +382,7 @@ xchk_refcountbt_rec( ...@@ -382,7 +382,7 @@ xchk_refcountbt_rec(
/* Make sure we have as many refc blocks as the rmap says. */ /* Make sure we have as many refc blocks as the rmap says. */
STATIC void STATIC void
xchk_refcount_xref_rmap( xchk_refcount_xref_rmap(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
xfs_filblks_t cow_blocks) xfs_filblks_t cow_blocks)
{ {
...@@ -417,7 +417,7 @@ xchk_refcount_xref_rmap( ...@@ -417,7 +417,7 @@ xchk_refcount_xref_rmap(
/* Scrub the refcount btree for some AG. */ /* Scrub the refcount btree for some AG. */
int int
xchk_refcountbt( xchk_refcountbt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
xfs_agblock_t cow_blocks = 0; xfs_agblock_t cow_blocks = 0;
...@@ -437,7 +437,7 @@ xchk_refcountbt( ...@@ -437,7 +437,7 @@ xchk_refcountbt(
/* xref check that a cow staging extent is marked in the refcountbt. */ /* xref check that a cow staging extent is marked in the refcountbt. */
void void
xchk_xref_is_cow_staging( xchk_xref_is_cow_staging(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
...@@ -483,7 +483,7 @@ xchk_xref_is_cow_staging( ...@@ -483,7 +483,7 @@ xchk_xref_is_cow_staging(
*/ */
void void
xchk_xref_is_not_shared( xchk_xref_is_not_shared(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_agblock_t agbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
int int
xrep_attempt( xrep_attempt(
struct xfs_inode *ip, struct xfs_inode *ip,
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
bool *fixed) bool *fixed)
{ {
int error = 0; int error = 0;
...@@ -106,7 +106,7 @@ xrep_failure( ...@@ -106,7 +106,7 @@ xrep_failure(
*/ */
int int
xrep_probe( xrep_probe(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
int error = 0; int error = 0;
...@@ -122,7 +122,7 @@ xrep_probe( ...@@ -122,7 +122,7 @@ xrep_probe(
*/ */
int int
xrep_roll_ag_trans( xrep_roll_ag_trans(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
int error; int error;
...@@ -179,7 +179,7 @@ xrep_ag_has_space( ...@@ -179,7 +179,7 @@ xrep_ag_has_space(
*/ */
xfs_extlen_t xfs_extlen_t
xrep_calc_ag_resblks( xrep_calc_ag_resblks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_mount *mp = sc->mp; struct xfs_mount *mp = sc->mp;
struct xfs_scrub_metadata *sm = sc->sm; struct xfs_scrub_metadata *sm = sc->sm;
...@@ -279,7 +279,7 @@ xrep_calc_ag_resblks( ...@@ -279,7 +279,7 @@ xrep_calc_ag_resblks(
/* Allocate a block in an AG. */ /* Allocate a block in an AG. */
int int
xrep_alloc_ag_block( xrep_alloc_ag_block(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
xfs_fsblock_t *fsbno, xfs_fsblock_t *fsbno,
enum xfs_ag_resv_type resv) enum xfs_ag_resv_type resv)
...@@ -330,7 +330,7 @@ xrep_alloc_ag_block( ...@@ -330,7 +330,7 @@ xrep_alloc_ag_block(
/* Initialize a new AG btree root block with zero entries. */ /* Initialize a new AG btree root block with zero entries. */
int int
xrep_init_btblock( xrep_init_btblock(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_fsblock_t fsb, xfs_fsblock_t fsb,
struct xfs_buf **bpp, struct xfs_buf **bpp,
xfs_btnum_t btnum, xfs_btnum_t btnum,
...@@ -385,7 +385,7 @@ xrep_init_btblock( ...@@ -385,7 +385,7 @@ xrep_init_btblock(
/* Collect a dead btree extent for later disposal. */ /* Collect a dead btree extent for later disposal. */
int int
xrep_collect_btree_extent( xrep_collect_btree_extent(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xrep_extent_list *exlist, struct xrep_extent_list *exlist,
xfs_fsblock_t fsbno, xfs_fsblock_t fsbno,
xfs_extlen_t len) xfs_extlen_t len)
...@@ -415,7 +415,7 @@ xrep_collect_btree_extent( ...@@ -415,7 +415,7 @@ xrep_collect_btree_extent(
*/ */
void void
xrep_cancel_btree_extents( xrep_cancel_btree_extents(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xrep_extent_list *exlist) struct xrep_extent_list *exlist)
{ {
struct xrep_extent *rex; struct xrep_extent *rex;
...@@ -463,7 +463,7 @@ xrep_btree_extent_cmp( ...@@ -463,7 +463,7 @@ xrep_btree_extent_cmp(
#define RIGHT_ALIGNED (1 << 1) #define RIGHT_ALIGNED (1 << 1)
int int
xrep_subtract_extents( xrep_subtract_extents(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xrep_extent_list *exlist, struct xrep_extent_list *exlist,
struct xrep_extent_list *sublist) struct xrep_extent_list *sublist)
{ {
...@@ -620,7 +620,7 @@ xrep_subtract_extents( ...@@ -620,7 +620,7 @@ xrep_subtract_extents(
*/ */
int int
xrep_invalidate_blocks( xrep_invalidate_blocks(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xrep_extent_list *exlist) struct xrep_extent_list *exlist)
{ {
struct xrep_extent *rex; struct xrep_extent *rex;
...@@ -658,7 +658,7 @@ xrep_invalidate_blocks( ...@@ -658,7 +658,7 @@ xrep_invalidate_blocks(
/* Ensure the freelist is the correct size. */ /* Ensure the freelist is the correct size. */
int int
xrep_fix_freelist( xrep_fix_freelist(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
bool can_shrink) bool can_shrink)
{ {
struct xfs_alloc_arg args = {0}; struct xfs_alloc_arg args = {0};
...@@ -678,7 +678,7 @@ xrep_fix_freelist( ...@@ -678,7 +678,7 @@ xrep_fix_freelist(
*/ */
STATIC int STATIC int
xrep_put_freelist( xrep_put_freelist(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t agbno) xfs_agblock_t agbno)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
...@@ -714,7 +714,7 @@ xrep_put_freelist( ...@@ -714,7 +714,7 @@ xrep_put_freelist(
/* Dispose of a single metadata block. */ /* Dispose of a single metadata block. */
STATIC int STATIC int
xrep_dispose_btree_block( xrep_dispose_btree_block(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_fsblock_t fsbno, xfs_fsblock_t fsbno,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
enum xfs_ag_resv_type resv) enum xfs_ag_resv_type resv)
...@@ -788,7 +788,7 @@ xrep_dispose_btree_block( ...@@ -788,7 +788,7 @@ xrep_dispose_btree_block(
/* Dispose of btree blocks from an old per-AG btree. */ /* Dispose of btree blocks from an old per-AG btree. */
int int
xrep_reap_btree_extents( xrep_reap_btree_extents(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xrep_extent_list *exlist, struct xrep_extent_list *exlist,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
enum xfs_ag_resv_type type) enum xfs_ag_resv_type type)
...@@ -851,7 +851,7 @@ xrep_reap_btree_extents( ...@@ -851,7 +851,7 @@ xrep_reap_btree_extents(
*/ */
struct xrep_findroot { struct xrep_findroot {
struct xfs_scrub_context *sc; struct xfs_scrub *sc;
struct xfs_buf *agfl_bp; struct xfs_buf *agfl_bp;
struct xfs_agf *agf; struct xfs_agf *agf;
struct xrep_find_ag_btree *btree_info; struct xrep_find_ag_btree *btree_info;
...@@ -981,7 +981,7 @@ xrep_findroot_rmap( ...@@ -981,7 +981,7 @@ xrep_findroot_rmap(
/* Find the roots of the per-AG btrees described in btree_info. */ /* Find the roots of the per-AG btrees described in btree_info. */
int int
xrep_find_ag_btree_roots( xrep_find_ag_btree_roots(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_buf *agf_bp, struct xfs_buf *agf_bp,
struct xrep_find_ag_btree *btree_info, struct xrep_find_ag_btree *btree_info,
struct xfs_buf *agfl_bp) struct xfs_buf *agfl_bp)
...@@ -1016,7 +1016,7 @@ xrep_find_ag_btree_roots( ...@@ -1016,7 +1016,7 @@ xrep_find_ag_btree_roots(
/* Force a quotacheck the next time we mount. */ /* Force a quotacheck the next time we mount. */
void void
xrep_force_quotacheck( xrep_force_quotacheck(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
uint dqtype) uint dqtype)
{ {
uint flag; uint flag;
...@@ -1044,7 +1044,7 @@ xrep_force_quotacheck( ...@@ -1044,7 +1044,7 @@ xrep_force_quotacheck(
*/ */
int int
xrep_ino_dqattach( xrep_ino_dqattach(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
int error; int error;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#ifndef __XFS_SCRUB_REPAIR_H__ #ifndef __XFS_SCRUB_REPAIR_H__
#define __XFS_SCRUB_REPAIR_H__ #define __XFS_SCRUB_REPAIR_H__
static inline int xrep_notsupported(struct xfs_scrub_context *sc) static inline int xrep_notsupported(struct xfs_scrub *sc)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
} }
...@@ -15,17 +15,17 @@ static inline int xrep_notsupported(struct xfs_scrub_context *sc) ...@@ -15,17 +15,17 @@ static inline int xrep_notsupported(struct xfs_scrub_context *sc)
/* Repair helpers */ /* Repair helpers */
int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub_context *sc, int xrep_attempt(struct xfs_inode *ip, struct xfs_scrub *sc,
bool *fixed); bool *fixed);
void xrep_failure(struct xfs_mount *mp); void xrep_failure(struct xfs_mount *mp);
int xrep_roll_ag_trans(struct xfs_scrub_context *sc); int xrep_roll_ag_trans(struct xfs_scrub *sc);
bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks, bool xrep_ag_has_space(struct xfs_perag *pag, xfs_extlen_t nr_blocks,
enum xfs_ag_resv_type type); enum xfs_ag_resv_type type);
xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub_context *sc); xfs_extlen_t xrep_calc_ag_resblks(struct xfs_scrub *sc);
int xrep_alloc_ag_block(struct xfs_scrub_context *sc, int xrep_alloc_ag_block(struct xfs_scrub *sc,
struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno, struct xfs_owner_info *oinfo, xfs_fsblock_t *fsbno,
enum xfs_ag_resv_type resv); enum xfs_ag_resv_type resv);
int xrep_init_btblock(struct xfs_scrub_context *sc, xfs_fsblock_t fsb, int xrep_init_btblock(struct xfs_scrub *sc, xfs_fsblock_t fsb,
struct xfs_buf **bpp, xfs_btnum_t btnum, struct xfs_buf **bpp, xfs_btnum_t btnum,
const struct xfs_buf_ops *ops); const struct xfs_buf_ops *ops);
...@@ -48,18 +48,18 @@ xrep_init_extent_list( ...@@ -48,18 +48,18 @@ xrep_init_extent_list(
#define for_each_xrep_extent_safe(rbe, n, exlist) \ #define for_each_xrep_extent_safe(rbe, n, exlist) \
list_for_each_entry_safe((rbe), (n), &(exlist)->list, list) list_for_each_entry_safe((rbe), (n), &(exlist)->list, list)
int xrep_collect_btree_extent(struct xfs_scrub_context *sc, int xrep_collect_btree_extent(struct xfs_scrub *sc,
struct xrep_extent_list *btlist, xfs_fsblock_t fsbno, struct xrep_extent_list *btlist, xfs_fsblock_t fsbno,
xfs_extlen_t len); xfs_extlen_t len);
void xrep_cancel_btree_extents(struct xfs_scrub_context *sc, void xrep_cancel_btree_extents(struct xfs_scrub *sc,
struct xrep_extent_list *btlist); struct xrep_extent_list *btlist);
int xrep_subtract_extents(struct xfs_scrub_context *sc, int xrep_subtract_extents(struct xfs_scrub *sc,
struct xrep_extent_list *exlist, struct xrep_extent_list *exlist,
struct xrep_extent_list *sublist); struct xrep_extent_list *sublist);
int xrep_fix_freelist(struct xfs_scrub_context *sc, bool can_shrink); int xrep_fix_freelist(struct xfs_scrub *sc, bool can_shrink);
int xrep_invalidate_blocks(struct xfs_scrub_context *sc, int xrep_invalidate_blocks(struct xfs_scrub *sc,
struct xrep_extent_list *btlist); struct xrep_extent_list *btlist);
int xrep_reap_btree_extents(struct xfs_scrub_context *sc, int xrep_reap_btree_extents(struct xfs_scrub *sc,
struct xrep_extent_list *exlist, struct xrep_extent_list *exlist,
struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type); struct xfs_owner_info *oinfo, enum xfs_ag_resv_type type);
...@@ -78,23 +78,23 @@ struct xrep_find_ag_btree { ...@@ -78,23 +78,23 @@ struct xrep_find_ag_btree {
unsigned int height; unsigned int height;
}; };
int xrep_find_ag_btree_roots(struct xfs_scrub_context *sc, int xrep_find_ag_btree_roots(struct xfs_scrub *sc,
struct xfs_buf *agf_bp, struct xfs_buf *agf_bp,
struct xrep_find_ag_btree *btree_info, struct xrep_find_ag_btree *btree_info,
struct xfs_buf *agfl_bp); struct xfs_buf *agfl_bp);
void xrep_force_quotacheck(struct xfs_scrub_context *sc, uint dqtype); void xrep_force_quotacheck(struct xfs_scrub *sc, uint dqtype);
int xrep_ino_dqattach(struct xfs_scrub_context *sc); int xrep_ino_dqattach(struct xfs_scrub *sc);
/* Metadata repairers */ /* Metadata repairers */
int xrep_probe(struct xfs_scrub_context *sc); int xrep_probe(struct xfs_scrub *sc);
int xrep_superblock(struct xfs_scrub_context *sc); int xrep_superblock(struct xfs_scrub *sc);
#else #else
static inline int xrep_attempt( static inline int xrep_attempt(
struct xfs_inode *ip, struct xfs_inode *ip,
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
bool *fixed) bool *fixed)
{ {
return -EOPNOTSUPP; return -EOPNOTSUPP;
...@@ -104,7 +104,7 @@ static inline void xrep_failure(struct xfs_mount *mp) {} ...@@ -104,7 +104,7 @@ static inline void xrep_failure(struct xfs_mount *mp) {}
static inline xfs_extlen_t static inline xfs_extlen_t
xrep_calc_ag_resblks( xrep_calc_ag_resblks(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)); ASSERT(!(sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR));
return 0; return 0;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
*/ */
int int
xchk_setup_ag_rmapbt( xchk_setup_ag_rmapbt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
return xchk_setup_ag_btree(sc, ip, false); return xchk_setup_ag_btree(sc, ip, false);
...@@ -41,7 +41,7 @@ xchk_setup_ag_rmapbt( ...@@ -41,7 +41,7 @@ xchk_setup_ag_rmapbt(
/* Cross-reference a rmap against the refcount btree. */ /* Cross-reference a rmap against the refcount btree. */
STATIC void STATIC void
xchk_rmapbt_xref_refc( xchk_rmapbt_xref_refc(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_rmap_irec *irec) struct xfs_rmap_irec *irec)
{ {
xfs_agblock_t fbno; xfs_agblock_t fbno;
...@@ -72,7 +72,7 @@ xchk_rmapbt_xref_refc( ...@@ -72,7 +72,7 @@ xchk_rmapbt_xref_refc(
/* Cross-reference with the other btrees. */ /* Cross-reference with the other btrees. */
STATIC void STATIC void
xchk_rmapbt_xref( xchk_rmapbt_xref(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_rmap_irec *irec) struct xfs_rmap_irec *irec)
{ {
xfs_agblock_t agbno = irec->rm_startblock; xfs_agblock_t agbno = irec->rm_startblock;
...@@ -172,7 +172,7 @@ xchk_rmapbt_rec( ...@@ -172,7 +172,7 @@ xchk_rmapbt_rec(
/* Scrub the rmap btree for some AG. */ /* Scrub the rmap btree for some AG. */
int int
xchk_rmapbt( xchk_rmapbt(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
...@@ -184,7 +184,7 @@ xchk_rmapbt( ...@@ -184,7 +184,7 @@ xchk_rmapbt(
/* xref check that the extent is owned by a given owner */ /* xref check that the extent is owned by a given owner */
static inline void static inline void
xchk_xref_check_owner( xchk_xref_check_owner(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_agblock_t bno,
xfs_extlen_t len, xfs_extlen_t len,
struct xfs_owner_info *oinfo, struct xfs_owner_info *oinfo,
...@@ -207,7 +207,7 @@ xchk_xref_check_owner( ...@@ -207,7 +207,7 @@ xchk_xref_check_owner(
/* xref check that the extent is owned by a given owner */ /* xref check that the extent is owned by a given owner */
void void
xchk_xref_is_owned_by( xchk_xref_is_owned_by(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_agblock_t bno,
xfs_extlen_t len, xfs_extlen_t len,
struct xfs_owner_info *oinfo) struct xfs_owner_info *oinfo)
...@@ -218,7 +218,7 @@ xchk_xref_is_owned_by( ...@@ -218,7 +218,7 @@ xchk_xref_is_owned_by(
/* xref check that the extent is not owned by a given owner */ /* xref check that the extent is not owned by a given owner */
void void
xchk_xref_is_not_owned_by( xchk_xref_is_not_owned_by(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_agblock_t bno,
xfs_extlen_t len, xfs_extlen_t len,
struct xfs_owner_info *oinfo) struct xfs_owner_info *oinfo)
...@@ -229,7 +229,7 @@ xchk_xref_is_not_owned_by( ...@@ -229,7 +229,7 @@ xchk_xref_is_not_owned_by(
/* xref check that the extent has no reverse mapping at all */ /* xref check that the extent has no reverse mapping at all */
void void
xchk_xref_has_no_owner( xchk_xref_has_no_owner(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_agblock_t bno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* Set us up with the realtime metadata locked. */ /* Set us up with the realtime metadata locked. */
int int
xchk_setup_rt( xchk_setup_rt(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
int error; int error;
...@@ -51,7 +51,7 @@ xchk_rtbitmap_rec( ...@@ -51,7 +51,7 @@ xchk_rtbitmap_rec(
struct xfs_rtalloc_rec *rec, struct xfs_rtalloc_rec *rec,
void *priv) void *priv)
{ {
struct xfs_scrub_context *sc = priv; struct xfs_scrub *sc = priv;
xfs_rtblock_t startblock; xfs_rtblock_t startblock;
xfs_rtblock_t blockcount; xfs_rtblock_t blockcount;
...@@ -68,7 +68,7 @@ xchk_rtbitmap_rec( ...@@ -68,7 +68,7 @@ xchk_rtbitmap_rec(
/* Scrub the realtime bitmap. */ /* Scrub the realtime bitmap. */
int int
xchk_rtbitmap( xchk_rtbitmap(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
int error; int error;
...@@ -88,7 +88,7 @@ xchk_rtbitmap( ...@@ -88,7 +88,7 @@ xchk_rtbitmap(
/* Scrub the realtime summary. */ /* Scrub the realtime summary. */
int int
xchk_rtsummary( xchk_rtsummary(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_inode *rsumip = sc->mp->m_rsumip; struct xfs_inode *rsumip = sc->mp->m_rsumip;
struct xfs_inode *old_ip = sc->ip; struct xfs_inode *old_ip = sc->ip;
...@@ -125,7 +125,7 @@ xchk_rtsummary( ...@@ -125,7 +125,7 @@ xchk_rtsummary(
/* xref check that the extent is not free in the rtbitmap */ /* xref check that the extent is not free in the rtbitmap */
void void
xchk_xref_is_used_rt_space( xchk_xref_is_used_rt_space(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
xfs_rtblock_t fsbno, xfs_rtblock_t fsbno,
xfs_extlen_t len) xfs_extlen_t len)
{ {
......
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
*/ */
static int static int
xchk_probe( xchk_probe(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
int error = 0; int error = 0;
...@@ -166,7 +166,7 @@ xchk_probe( ...@@ -166,7 +166,7 @@ xchk_probe(
/* Free all the resources and finish the transactions. */ /* Free all the resources and finish the transactions. */
STATIC int STATIC int
xchk_teardown( xchk_teardown(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip_in, struct xfs_inode *ip_in,
int error) int error)
{ {
...@@ -447,7 +447,7 @@ xchk_validate_inputs( ...@@ -447,7 +447,7 @@ xchk_validate_inputs(
} }
#ifdef CONFIG_XFS_ONLINE_REPAIR #ifdef CONFIG_XFS_ONLINE_REPAIR
static inline void xchk_postmortem(struct xfs_scrub_context *sc) static inline void xchk_postmortem(struct xfs_scrub *sc)
{ {
/* /*
* Userspace asked us to repair something, we repaired it, rescanned * 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,7 +460,7 @@ static inline void xchk_postmortem(struct xfs_scrub_context *sc)
xrep_failure(sc->mp); xrep_failure(sc->mp);
} }
#else #else
static inline void xchk_postmortem(struct xfs_scrub_context *sc) static inline void xchk_postmortem(struct xfs_scrub *sc)
{ {
/* /*
* Userspace asked us to scrub something, it's broken, and we have no * Userspace asked us to scrub something, it's broken, and we have no
...@@ -479,7 +479,7 @@ xfs_scrub_metadata( ...@@ -479,7 +479,7 @@ xfs_scrub_metadata(
struct xfs_inode *ip, struct xfs_inode *ip,
struct xfs_scrub_metadata *sm) struct xfs_scrub_metadata *sm)
{ {
struct xfs_scrub_context sc; struct xfs_scrub sc;
struct xfs_mount *mp = ip->i_mount; struct xfs_mount *mp = ip->i_mount;
bool try_harder = false; bool try_harder = false;
bool already_fixed = false; bool already_fixed = false;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#ifndef __XFS_SCRUB_SCRUB_H__ #ifndef __XFS_SCRUB_SCRUB_H__
#define __XFS_SCRUB_SCRUB_H__ #define __XFS_SCRUB_SCRUB_H__
struct xfs_scrub_context; struct xfs_scrub;
/* Type info and names for the scrub types. */ /* Type info and names for the scrub types. */
enum xchk_type { enum xchk_type {
...@@ -18,14 +18,14 @@ enum xchk_type { ...@@ -18,14 +18,14 @@ enum xchk_type {
struct xchk_meta_ops { struct xchk_meta_ops {
/* Acquire whatever resources are needed for the operation. */ /* Acquire whatever resources are needed for the operation. */
int (*setup)(struct xfs_scrub_context *, int (*setup)(struct xfs_scrub *,
struct xfs_inode *); struct xfs_inode *);
/* Examine metadata for errors. */ /* Examine metadata for errors. */
int (*scrub)(struct xfs_scrub_context *); int (*scrub)(struct xfs_scrub *);
/* Repair or optimize the metadata. */ /* Repair or optimize the metadata. */
int (*repair)(struct xfs_scrub_context *); int (*repair)(struct xfs_scrub *);
/* Decide if we even have this piece of metadata. */ /* Decide if we even have this piece of metadata. */
bool (*has)(struct xfs_sb *); bool (*has)(struct xfs_sb *);
...@@ -53,7 +53,7 @@ struct xchk_ag { ...@@ -53,7 +53,7 @@ struct xchk_ag {
struct xfs_btree_cur *refc_cur; struct xfs_btree_cur *refc_cur;
}; };
struct xfs_scrub_context { struct xfs_scrub {
/* General scrub state. */ /* General scrub state. */
struct xfs_mount *mp; struct xfs_mount *mp;
struct xfs_scrub_metadata *sm; struct xfs_scrub_metadata *sm;
...@@ -70,71 +70,71 @@ struct xfs_scrub_context { ...@@ -70,71 +70,71 @@ struct xfs_scrub_context {
}; };
/* Metadata scrubbers */ /* Metadata scrubbers */
int xchk_tester(struct xfs_scrub_context *sc); int xchk_tester(struct xfs_scrub *sc);
int xchk_superblock(struct xfs_scrub_context *sc); int xchk_superblock(struct xfs_scrub *sc);
int xchk_agf(struct xfs_scrub_context *sc); int xchk_agf(struct xfs_scrub *sc);
int xchk_agfl(struct xfs_scrub_context *sc); int xchk_agfl(struct xfs_scrub *sc);
int xchk_agi(struct xfs_scrub_context *sc); int xchk_agi(struct xfs_scrub *sc);
int xchk_bnobt(struct xfs_scrub_context *sc); int xchk_bnobt(struct xfs_scrub *sc);
int xchk_cntbt(struct xfs_scrub_context *sc); int xchk_cntbt(struct xfs_scrub *sc);
int xchk_inobt(struct xfs_scrub_context *sc); int xchk_inobt(struct xfs_scrub *sc);
int xchk_finobt(struct xfs_scrub_context *sc); int xchk_finobt(struct xfs_scrub *sc);
int xchk_rmapbt(struct xfs_scrub_context *sc); int xchk_rmapbt(struct xfs_scrub *sc);
int xchk_refcountbt(struct xfs_scrub_context *sc); int xchk_refcountbt(struct xfs_scrub *sc);
int xchk_inode(struct xfs_scrub_context *sc); int xchk_inode(struct xfs_scrub *sc);
int xchk_bmap_data(struct xfs_scrub_context *sc); int xchk_bmap_data(struct xfs_scrub *sc);
int xchk_bmap_attr(struct xfs_scrub_context *sc); int xchk_bmap_attr(struct xfs_scrub *sc);
int xchk_bmap_cow(struct xfs_scrub_context *sc); int xchk_bmap_cow(struct xfs_scrub *sc);
int xchk_directory(struct xfs_scrub_context *sc); int xchk_directory(struct xfs_scrub *sc);
int xchk_xattr(struct xfs_scrub_context *sc); int xchk_xattr(struct xfs_scrub *sc);
int xchk_symlink(struct xfs_scrub_context *sc); int xchk_symlink(struct xfs_scrub *sc);
int xchk_parent(struct xfs_scrub_context *sc); int xchk_parent(struct xfs_scrub *sc);
#ifdef CONFIG_XFS_RT #ifdef CONFIG_XFS_RT
int xchk_rtbitmap(struct xfs_scrub_context *sc); int xchk_rtbitmap(struct xfs_scrub *sc);
int xchk_rtsummary(struct xfs_scrub_context *sc); int xchk_rtsummary(struct xfs_scrub *sc);
#else #else
static inline int static inline int
xchk_rtbitmap(struct xfs_scrub_context *sc) xchk_rtbitmap(struct xfs_scrub *sc)
{ {
return -ENOENT; return -ENOENT;
} }
static inline int static inline int
xchk_rtsummary(struct xfs_scrub_context *sc) xchk_rtsummary(struct xfs_scrub *sc)
{ {
return -ENOENT; return -ENOENT;
} }
#endif #endif
#ifdef CONFIG_XFS_QUOTA #ifdef CONFIG_XFS_QUOTA
int xchk_quota(struct xfs_scrub_context *sc); int xchk_quota(struct xfs_scrub *sc);
#else #else
static inline int static inline int
xchk_quota(struct xfs_scrub_context *sc) xchk_quota(struct xfs_scrub *sc)
{ {
return -ENOENT; return -ENOENT;
} }
#endif #endif
/* cross-referencing helpers */ /* cross-referencing helpers */
void xchk_xref_is_used_space(struct xfs_scrub_context *sc, void xchk_xref_is_used_space(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len); xfs_agblock_t agbno, xfs_extlen_t len);
void xchk_xref_is_not_inode_chunk(struct xfs_scrub_context *sc, void xchk_xref_is_not_inode_chunk(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len); xfs_agblock_t agbno, xfs_extlen_t len);
void xchk_xref_is_inode_chunk(struct xfs_scrub_context *sc, void xchk_xref_is_inode_chunk(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len); xfs_agblock_t agbno, xfs_extlen_t len);
void xchk_xref_is_owned_by(struct xfs_scrub_context *sc, void xchk_xref_is_owned_by(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len, xfs_agblock_t agbno, xfs_extlen_t len,
struct xfs_owner_info *oinfo); struct xfs_owner_info *oinfo);
void xchk_xref_is_not_owned_by(struct xfs_scrub_context *sc, void xchk_xref_is_not_owned_by(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len, xfs_agblock_t agbno, xfs_extlen_t len,
struct xfs_owner_info *oinfo); struct xfs_owner_info *oinfo);
void xchk_xref_has_no_owner(struct xfs_scrub_context *sc, void xchk_xref_has_no_owner(struct xfs_scrub *sc,
xfs_agblock_t agbno, xfs_extlen_t len); xfs_agblock_t agbno, xfs_extlen_t len);
void xchk_xref_is_cow_staging(struct xfs_scrub_context *sc, void xchk_xref_is_cow_staging(struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_extlen_t len); xfs_agblock_t bno, xfs_extlen_t len);
void xchk_xref_is_not_shared(struct xfs_scrub_context *sc, void xchk_xref_is_not_shared(struct xfs_scrub *sc,
xfs_agblock_t bno, xfs_extlen_t len); xfs_agblock_t bno, xfs_extlen_t len);
#ifdef CONFIG_XFS_RT #ifdef CONFIG_XFS_RT
void xchk_xref_is_used_rt_space(struct xfs_scrub_context *sc, void xchk_xref_is_used_rt_space(struct xfs_scrub *sc,
xfs_rtblock_t rtbno, xfs_extlen_t len); xfs_rtblock_t rtbno, xfs_extlen_t len);
#else #else
# define xchk_xref_is_used_rt_space(sc, rtbno, len) do { } while (0) # define xchk_xref_is_used_rt_space(sc, rtbno, len) do { } while (0)
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
/* Set us up to scrub a symbolic link. */ /* Set us up to scrub a symbolic link. */
int int
xchk_setup_symlink( xchk_setup_symlink(
struct xfs_scrub_context *sc, struct xfs_scrub *sc,
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
/* Allocate the buffer without the inode lock held. */ /* Allocate the buffer without the inode lock held. */
...@@ -41,7 +41,7 @@ xchk_setup_symlink( ...@@ -41,7 +41,7 @@ xchk_setup_symlink(
int int
xchk_symlink( xchk_symlink(
struct xfs_scrub_context *sc) struct xfs_scrub *sc)
{ {
struct xfs_inode *ip = sc->ip; struct xfs_inode *ip = sc->ip;
struct xfs_ifork *ifp; struct xfs_ifork *ifp;
......
...@@ -59,7 +59,7 @@ DEFINE_SCRUB_EVENT(xrep_attempt); ...@@ -59,7 +59,7 @@ DEFINE_SCRUB_EVENT(xrep_attempt);
DEFINE_SCRUB_EVENT(xrep_done); DEFINE_SCRUB_EVENT(xrep_done);
TRACE_EVENT(xchk_op_error, TRACE_EVENT(xchk_op_error,
TP_PROTO(struct xfs_scrub_context *sc, xfs_agnumber_t agno, TP_PROTO(struct xfs_scrub *sc, xfs_agnumber_t agno,
xfs_agblock_t bno, int error, void *ret_ip), xfs_agblock_t bno, int error, void *ret_ip),
TP_ARGS(sc, agno, bno, error, ret_ip), TP_ARGS(sc, agno, bno, error, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -88,7 +88,7 @@ TRACE_EVENT(xchk_op_error, ...@@ -88,7 +88,7 @@ TRACE_EVENT(xchk_op_error,
); );
TRACE_EVENT(xchk_file_op_error, TRACE_EVENT(xchk_file_op_error,
TP_PROTO(struct xfs_scrub_context *sc, int whichfork, TP_PROTO(struct xfs_scrub *sc, int whichfork,
xfs_fileoff_t offset, int error, void *ret_ip), xfs_fileoff_t offset, int error, void *ret_ip),
TP_ARGS(sc, whichfork, offset, error, ret_ip), TP_ARGS(sc, whichfork, offset, error, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -120,7 +120,7 @@ TRACE_EVENT(xchk_file_op_error, ...@@ -120,7 +120,7 @@ TRACE_EVENT(xchk_file_op_error,
); );
DECLARE_EVENT_CLASS(xchk_block_error_class, DECLARE_EVENT_CLASS(xchk_block_error_class,
TP_PROTO(struct xfs_scrub_context *sc, xfs_daddr_t daddr, void *ret_ip), TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, void *ret_ip),
TP_ARGS(sc, daddr, ret_ip), TP_ARGS(sc, daddr, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
...@@ -154,7 +154,7 @@ DECLARE_EVENT_CLASS(xchk_block_error_class, ...@@ -154,7 +154,7 @@ DECLARE_EVENT_CLASS(xchk_block_error_class,
#define DEFINE_SCRUB_BLOCK_ERROR_EVENT(name) \ #define DEFINE_SCRUB_BLOCK_ERROR_EVENT(name) \
DEFINE_EVENT(xchk_block_error_class, name, \ DEFINE_EVENT(xchk_block_error_class, name, \
TP_PROTO(struct xfs_scrub_context *sc, xfs_daddr_t daddr, \ TP_PROTO(struct xfs_scrub *sc, xfs_daddr_t daddr, \
void *ret_ip), \ void *ret_ip), \
TP_ARGS(sc, daddr, ret_ip)) TP_ARGS(sc, daddr, ret_ip))
...@@ -162,7 +162,7 @@ DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_error); ...@@ -162,7 +162,7 @@ DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_error);
DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_preen); DEFINE_SCRUB_BLOCK_ERROR_EVENT(xchk_block_preen);
DECLARE_EVENT_CLASS(xchk_ino_error_class, DECLARE_EVENT_CLASS(xchk_ino_error_class,
TP_PROTO(struct xfs_scrub_context *sc, xfs_ino_t ino, void *ret_ip), TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, void *ret_ip),
TP_ARGS(sc, ino, ret_ip), TP_ARGS(sc, ino, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
...@@ -185,7 +185,7 @@ DECLARE_EVENT_CLASS(xchk_ino_error_class, ...@@ -185,7 +185,7 @@ DECLARE_EVENT_CLASS(xchk_ino_error_class,
#define DEFINE_SCRUB_INO_ERROR_EVENT(name) \ #define DEFINE_SCRUB_INO_ERROR_EVENT(name) \
DEFINE_EVENT(xchk_ino_error_class, name, \ DEFINE_EVENT(xchk_ino_error_class, name, \
TP_PROTO(struct xfs_scrub_context *sc, xfs_ino_t ino, \ TP_PROTO(struct xfs_scrub *sc, xfs_ino_t ino, \
void *ret_ip), \ void *ret_ip), \
TP_ARGS(sc, ino, ret_ip)) TP_ARGS(sc, ino, ret_ip))
...@@ -194,7 +194,7 @@ DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_preen); ...@@ -194,7 +194,7 @@ DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_preen);
DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_warning); DEFINE_SCRUB_INO_ERROR_EVENT(xchk_ino_warning);
DECLARE_EVENT_CLASS(xchk_fblock_error_class, DECLARE_EVENT_CLASS(xchk_fblock_error_class,
TP_PROTO(struct xfs_scrub_context *sc, int whichfork, TP_PROTO(struct xfs_scrub *sc, int whichfork,
xfs_fileoff_t offset, void *ret_ip), xfs_fileoff_t offset, void *ret_ip),
TP_ARGS(sc, whichfork, offset, ret_ip), TP_ARGS(sc, whichfork, offset, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -224,7 +224,7 @@ DECLARE_EVENT_CLASS(xchk_fblock_error_class, ...@@ -224,7 +224,7 @@ DECLARE_EVENT_CLASS(xchk_fblock_error_class,
#define DEFINE_SCRUB_FBLOCK_ERROR_EVENT(name) \ #define DEFINE_SCRUB_FBLOCK_ERROR_EVENT(name) \
DEFINE_EVENT(xchk_fblock_error_class, name, \ DEFINE_EVENT(xchk_fblock_error_class, name, \
TP_PROTO(struct xfs_scrub_context *sc, int whichfork, \ TP_PROTO(struct xfs_scrub *sc, int whichfork, \
xfs_fileoff_t offset, void *ret_ip), \ xfs_fileoff_t offset, void *ret_ip), \
TP_ARGS(sc, whichfork, offset, ret_ip)) TP_ARGS(sc, whichfork, offset, ret_ip))
...@@ -232,7 +232,7 @@ DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_error); ...@@ -232,7 +232,7 @@ DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_error);
DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning); DEFINE_SCRUB_FBLOCK_ERROR_EVENT(xchk_fblock_warning);
TRACE_EVENT(xchk_incomplete, TRACE_EVENT(xchk_incomplete,
TP_PROTO(struct xfs_scrub_context *sc, void *ret_ip), TP_PROTO(struct xfs_scrub *sc, void *ret_ip),
TP_ARGS(sc, ret_ip), TP_ARGS(sc, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
...@@ -251,7 +251,7 @@ TRACE_EVENT(xchk_incomplete, ...@@ -251,7 +251,7 @@ TRACE_EVENT(xchk_incomplete,
); );
TRACE_EVENT(xchk_btree_op_error, TRACE_EVENT(xchk_btree_op_error,
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
int level, int error, void *ret_ip), int level, int error, void *ret_ip),
TP_ARGS(sc, cur, level, error, ret_ip), TP_ARGS(sc, cur, level, error, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -291,7 +291,7 @@ TRACE_EVENT(xchk_btree_op_error, ...@@ -291,7 +291,7 @@ TRACE_EVENT(xchk_btree_op_error,
); );
TRACE_EVENT(xchk_ifork_btree_op_error, TRACE_EVENT(xchk_ifork_btree_op_error,
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
int level, int error, void *ret_ip), int level, int error, void *ret_ip),
TP_ARGS(sc, cur, level, error, ret_ip), TP_ARGS(sc, cur, level, error, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -336,7 +336,7 @@ TRACE_EVENT(xchk_ifork_btree_op_error, ...@@ -336,7 +336,7 @@ TRACE_EVENT(xchk_ifork_btree_op_error,
); );
TRACE_EVENT(xchk_btree_error, TRACE_EVENT(xchk_btree_error,
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
int level, void *ret_ip), int level, void *ret_ip),
TP_ARGS(sc, cur, level, ret_ip), TP_ARGS(sc, cur, level, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -372,7 +372,7 @@ TRACE_EVENT(xchk_btree_error, ...@@ -372,7 +372,7 @@ TRACE_EVENT(xchk_btree_error,
); );
TRACE_EVENT(xchk_ifork_btree_error, TRACE_EVENT(xchk_ifork_btree_error,
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
int level, void *ret_ip), int level, void *ret_ip),
TP_ARGS(sc, cur, level, ret_ip), TP_ARGS(sc, cur, level, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_ifork_btree_error, ...@@ -414,7 +414,7 @@ TRACE_EVENT(xchk_ifork_btree_error,
); );
DECLARE_EVENT_CLASS(xchk_sbtree_class, DECLARE_EVENT_CLASS(xchk_sbtree_class,
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
int level), int level),
TP_ARGS(sc, cur, level), TP_ARGS(sc, cur, level),
TP_STRUCT__entry( TP_STRUCT__entry(
...@@ -451,7 +451,7 @@ DECLARE_EVENT_CLASS(xchk_sbtree_class, ...@@ -451,7 +451,7 @@ DECLARE_EVENT_CLASS(xchk_sbtree_class,
) )
#define DEFINE_SCRUB_SBTREE_EVENT(name) \ #define DEFINE_SCRUB_SBTREE_EVENT(name) \
DEFINE_EVENT(xchk_sbtree_class, name, \ DEFINE_EVENT(xchk_sbtree_class, name, \
TP_PROTO(struct xfs_scrub_context *sc, struct xfs_btree_cur *cur, \ TP_PROTO(struct xfs_scrub *sc, struct xfs_btree_cur *cur, \
int level), \ int level), \
TP_ARGS(sc, cur, level)) TP_ARGS(sc, cur, level))
...@@ -459,7 +459,7 @@ DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_rec); ...@@ -459,7 +459,7 @@ DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_rec);
DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_key); DEFINE_SCRUB_SBTREE_EVENT(xchk_btree_key);
TRACE_EVENT(xchk_xref_error, TRACE_EVENT(xchk_xref_error,
TP_PROTO(struct xfs_scrub_context *sc, int error, void *ret_ip), TP_PROTO(struct xfs_scrub *sc, int error, void *ret_ip),
TP_ARGS(sc, error, ret_ip), TP_ARGS(sc, error, ret_ip),
TP_STRUCT__entry( TP_STRUCT__entry(
__field(dev_t, dev) __field(dev_t, dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment