Lines Matching refs:sc
64 struct xfs_scrub *sc) in xchk_fscount_warmup() argument
66 struct xfs_mount *mp = sc->mp; in xchk_fscount_warmup()
80 error = xfs_ialloc_read_agi(mp, sc->tp, agno, &agi_bp); in xchk_fscount_warmup()
83 error = xfs_alloc_read_agf(mp, sc->tp, agno, 0, &agf_bp); in xchk_fscount_warmup()
122 struct xfs_scrub *sc, in xchk_setup_fscounters() argument
128 sc->buf = kmem_zalloc(sizeof(struct xchk_fscounters), 0); in xchk_setup_fscounters()
129 if (!sc->buf) in xchk_setup_fscounters()
131 fsc = sc->buf; in xchk_setup_fscounters()
133 xfs_icount_range(sc->mp, &fsc->icount_min, &fsc->icount_max); in xchk_setup_fscounters()
136 error = xchk_fscount_warmup(sc); in xchk_setup_fscounters()
145 xchk_stop_reaping(sc); in xchk_setup_fscounters()
147 return xchk_trans_alloc(sc, 0); in xchk_setup_fscounters()
158 struct xfs_scrub *sc, in xchk_fscount_aggregate_agcounts() argument
161 struct xfs_mount *mp = sc->mp; in xchk_fscount_aggregate_agcounts()
235 xchk_set_incomplete(sc); in xchk_fscount_aggregate_agcounts()
257 struct xfs_scrub *sc, in xchk_fscount_within_range() argument
265 trace_xchk_fscounters_within_range(sc->mp, expected, curr_value, in xchk_fscount_within_range()
294 xchk_set_incomplete(sc); in xchk_fscount_within_range()
304 struct xfs_scrub *sc) in xchk_fscounters() argument
306 struct xfs_mount *mp = sc->mp; in xchk_fscounters()
307 struct xchk_fscounters *fsc = sc->buf; in xchk_fscounters()
318 xchk_set_corrupt(sc); in xchk_fscounters()
322 xchk_set_corrupt(sc); in xchk_fscounters()
326 xchk_set_corrupt(sc); in xchk_fscounters()
333 xchk_set_corrupt(sc); in xchk_fscounters()
336 error = xchk_fscount_aggregate_agcounts(sc, fsc); in xchk_fscounters()
337 if (!xchk_process_error(sc, 0, XFS_SB_BLOCK(mp), &error)) in xchk_fscounters()
339 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_INCOMPLETE) in xchk_fscounters()
343 if (!xchk_fscount_within_range(sc, icount, &mp->m_icount, fsc->icount)) in xchk_fscounters()
344 xchk_set_corrupt(sc); in xchk_fscounters()
346 if (!xchk_fscount_within_range(sc, ifree, &mp->m_ifree, fsc->ifree)) in xchk_fscounters()
347 xchk_set_corrupt(sc); in xchk_fscounters()
349 if (!xchk_fscount_within_range(sc, fdblocks, &mp->m_fdblocks, in xchk_fscounters()
351 xchk_set_corrupt(sc); in xchk_fscounters()