Lines Matching refs:sc
9 int xchk_trans_alloc(struct xfs_scrub *sc, uint resblks);
10 int xchk_trans_alloc_empty(struct xfs_scrub *sc);
11 void xchk_trans_cancel(struct xfs_scrub *sc);
13 bool xchk_process_error(struct xfs_scrub *sc, xfs_agnumber_t agno,
15 bool xchk_fblock_process_error(struct xfs_scrub *sc, int whichfork,
18 bool xchk_xref_process_error(struct xfs_scrub *sc,
20 bool xchk_fblock_xref_process_error(struct xfs_scrub *sc,
23 void xchk_block_set_preen(struct xfs_scrub *sc,
25 void xchk_ino_set_preen(struct xfs_scrub *sc, xfs_ino_t ino);
27 void xchk_set_corrupt(struct xfs_scrub *sc);
28 void xchk_block_set_corrupt(struct xfs_scrub *sc,
30 void xchk_ino_set_corrupt(struct xfs_scrub *sc, xfs_ino_t ino);
31 void xchk_fblock_set_corrupt(struct xfs_scrub *sc, int whichfork,
34 void xchk_qcheck_set_corrupt(struct xfs_scrub *sc, unsigned int dqtype,
38 void xchk_block_xref_set_corrupt(struct xfs_scrub *sc,
40 void xchk_ino_xref_set_corrupt(struct xfs_scrub *sc,
42 void xchk_fblock_xref_set_corrupt(struct xfs_scrub *sc,
45 void xchk_ino_set_warning(struct xfs_scrub *sc, xfs_ino_t ino);
46 void xchk_fblock_set_warning(struct xfs_scrub *sc, int whichfork,
49 void xchk_set_incomplete(struct xfs_scrub *sc);
53 bool xchk_should_check_xref(struct xfs_scrub *sc, int *error,
56 static inline int xchk_setup_nothing(struct xfs_scrub *sc) in xchk_setup_nothing() argument
62 int xchk_setup_agheader(struct xfs_scrub *sc);
63 int xchk_setup_fs(struct xfs_scrub *sc);
64 int xchk_setup_ag_allocbt(struct xfs_scrub *sc);
65 int xchk_setup_ag_iallocbt(struct xfs_scrub *sc);
66 int xchk_setup_ag_rmapbt(struct xfs_scrub *sc);
67 int xchk_setup_ag_refcountbt(struct xfs_scrub *sc);
68 int xchk_setup_inode(struct xfs_scrub *sc);
69 int xchk_setup_inode_bmap(struct xfs_scrub *sc);
70 int xchk_setup_inode_bmap_data(struct xfs_scrub *sc);
71 int xchk_setup_directory(struct xfs_scrub *sc);
72 int xchk_setup_xattr(struct xfs_scrub *sc);
73 int xchk_setup_symlink(struct xfs_scrub *sc);
74 int xchk_setup_parent(struct xfs_scrub *sc);
75 int xchk_setup_dirtree(struct xfs_scrub *sc);
77 int xchk_setup_rtbitmap(struct xfs_scrub *sc);
78 int xchk_setup_rtsummary(struct xfs_scrub *sc);
84 int xchk_ino_dqattach(struct xfs_scrub *sc);
85 int xchk_setup_quota(struct xfs_scrub *sc);
86 int xchk_setup_quotacheck(struct xfs_scrub *sc);
89 xchk_ino_dqattach(struct xfs_scrub *sc) in xchk_ino_dqattach() argument
96 int xchk_setup_fscounters(struct xfs_scrub *sc);
97 int xchk_setup_nlinks(struct xfs_scrub *sc);
99 void xchk_ag_free(struct xfs_scrub *sc, struct xchk_ag *sa);
100 int xchk_ag_init(struct xfs_scrub *sc, xfs_agnumber_t agno,
102 int xchk_perag_drain_and_lock(struct xfs_scrub *sc);
111 struct xfs_scrub *sc, in xchk_ag_init_existing() argument
115 int error = xchk_ag_init(sc, agno, sa); in xchk_ag_init_existing()
120 int xchk_ag_read_headers(struct xfs_scrub *sc, xfs_agnumber_t agno,
123 void xchk_ag_btcur_init(struct xfs_scrub *sc, struct xchk_ag *sa);
124 int xchk_count_rmap_ownedby_ag(struct xfs_scrub *sc, struct xfs_btree_cur *cur,
127 int xchk_setup_ag_btree(struct xfs_scrub *sc, bool force_log);
128 int xchk_iget_for_scrubbing(struct xfs_scrub *sc);
129 int xchk_setup_inode_contents(struct xfs_scrub *sc, unsigned int resblks);
130 int xchk_install_live_inode(struct xfs_scrub *sc, struct xfs_inode *ip);
132 void xchk_ilock(struct xfs_scrub *sc, unsigned int ilock_flags);
133 bool xchk_ilock_nowait(struct xfs_scrub *sc, unsigned int ilock_flags);
134 void xchk_iunlock(struct xfs_scrub *sc, unsigned int ilock_flags);
136 void xchk_buffer_recheck(struct xfs_scrub *sc, struct xfs_buf *bp);
143 int xchk_iget(struct xfs_scrub *sc, xfs_ino_t inum, struct xfs_inode **ipp);
144 int xchk_iget_agi(struct xfs_scrub *sc, xfs_ino_t inum,
146 void xchk_irele(struct xfs_scrub *sc, struct xfs_inode *ip);
147 int xchk_install_handle_inode(struct xfs_scrub *sc, struct xfs_inode *ip);
155 xchk_iget_safe(struct xfs_scrub *sc, xfs_ino_t inum, struct xfs_inode **ipp) in xchk_iget_safe() argument
159 ASSERT(sc->tp == NULL); in xchk_iget_safe()
161 error = xchk_trans_alloc(sc, 0); in xchk_iget_safe()
164 error = xchk_iget(sc, inum, ipp); in xchk_iget_safe()
165 xchk_trans_cancel(sc); in xchk_iget_safe()
197 static inline bool xchk_could_repair(const struct xfs_scrub *sc) in xchk_could_repair() argument
199 return (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR) && in xchk_could_repair()
200 !(sc->flags & XREP_ALREADY_FIXED); in xchk_could_repair()
203 # define xchk_needs_repair(sc) (false) argument
204 # define xchk_could_repair(sc) (false) argument
207 int xchk_metadata_inode_forks(struct xfs_scrub *sc);
213 #define xchk_xfile_descr(sc, fmt, ...) \ argument
215 (sc)->mp->m_super->s_id, ##__VA_ARGS__)
216 #define xchk_xfile_ag_descr(sc, fmt, ...) \ argument
218 (sc)->mp->m_super->s_id, \
219 (sc)->sa.pag ? (sc)->sa.pag->pag_agno : (sc)->sm->sm_agno, \
221 #define xchk_xfile_ino_descr(sc, fmt, ...) \ argument
223 (sc)->mp->m_super->s_id, \
224 (sc)->ip ? (sc)->ip->i_ino : (sc)->sm->sm_ino, \
234 static inline bool xchk_need_intent_drain(struct xfs_scrub *sc) in xchk_need_intent_drain() argument
236 return sc->flags & XCHK_NEED_DRAIN; in xchk_need_intent_drain()
239 void xchk_fsgates_enable(struct xfs_scrub *sc, unsigned int scrub_fshooks);
241 int xchk_inode_is_allocated(struct xfs_scrub *sc, xfs_agino_t agino,