Lines Matching full:sc

36 	struct xfs_scrub	*sc)  in xchk_setup_rtrmapbt()  argument
40 if (xchk_need_intent_drain(sc)) in xchk_setup_rtrmapbt()
41 xchk_fsgates_enable(sc, XCHK_FSGATES_DRAIN); in xchk_setup_rtrmapbt()
43 if (xchk_could_repair(sc)) { in xchk_setup_rtrmapbt()
44 error = xrep_setup_rtrmapbt(sc); in xchk_setup_rtrmapbt()
49 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtrmapbt()
53 error = xchk_setup_rt(sc); in xchk_setup_rtrmapbt()
57 error = xchk_install_live_inode(sc, rtg_rmap(sc->sr.rtg)); in xchk_setup_rtrmapbt()
61 return xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xchk_setup_rtrmapbt()
83 struct xfs_scrub *sc, in xchk_rtrmapbt_is_shareable() argument
86 if (!xfs_has_rtreflink(sc->mp)) in xchk_rtrmapbt_is_shareable()
102 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrmapbt_check_overlapping()
115 if (!xchk_rtrmapbt_is_shareable(bs->sc, &cr->overlap_rec) || in xchk_rtrmapbt_check_overlapping()
116 !xchk_rtrmapbt_is_shareable(bs->sc, irec)) in xchk_rtrmapbt_check_overlapping()
117 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrmapbt_check_overlapping()
159 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrmapbt_check_mergeable()
163 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrmapbt_check_mergeable()
171 struct xfs_scrub *sc, in xchk_rtrmapbt_xref_rtrefc() argument
182 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_rtrmapbt_xref_rtrefc()
191 error = xfs_refcount_find_shared(sc->sr.refc_cur, irec->rm_startblock, in xchk_rtrmapbt_xref_rtrefc()
193 if (!xchk_should_check_xref(sc, &error, &sc->sr.refc_cur)) in xchk_rtrmapbt_xref_rtrefc()
196 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_rtrmapbt_xref_rtrefc()
202 struct xfs_scrub *sc, in xchk_rtrmapbt_xref() argument
205 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrmapbt_xref()
208 xchk_xref_is_used_rt_space(sc, in xchk_rtrmapbt_xref()
209 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rm_startblock), in xchk_rtrmapbt_xref()
212 xchk_xref_is_cow_staging(sc, irec->rm_startblock, in xchk_rtrmapbt_xref()
215 xchk_rtrmapbt_xref_rtrefc(sc, irec); in xchk_rtrmapbt_xref()
229 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrmapbt_rec()
233 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrmapbt_rec()
238 xchk_rtrmapbt_xref(bs->sc, &irec); in xchk_rtrmapbt_rec()
245 struct xfs_scrub *sc) in xchk_rtrmapbt() argument
247 struct xfs_inode *ip = rtg_rmap(sc->sr.rtg); in xchk_rtrmapbt()
252 error = xchk_metadata_inode_forks(sc); in xchk_rtrmapbt()
253 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtrmapbt()
257 return xchk_btree(sc, sc->sr.rmap_cur, xchk_rtrmapbt_rec, &oinfo, &cr); in xchk_rtrmapbt()
263 struct xfs_scrub *sc, in xchk_xref_has_no_rt_owner() argument
270 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_has_no_rt_owner()
273 error = xfs_rmap_has_records(sc->sr.rmap_cur, bno, len, &outcome); in xchk_xref_has_no_rt_owner()
274 if (!xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur)) in xchk_xref_has_no_rt_owner()
277 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_has_no_rt_owner()
283 struct xfs_scrub *sc, in xchk_xref_has_rt_owner() argument
290 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_has_rt_owner()
293 error = xfs_rmap_has_records(sc->sr.rmap_cur, bno, len, &outcome); in xchk_xref_has_rt_owner()
294 if (!xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur)) in xchk_xref_has_rt_owner()
297 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_has_rt_owner()
303 struct xfs_scrub *sc, in xchk_xref_is_only_rt_owned_by() argument
311 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_only_rt_owned_by()
314 error = xfs_rmap_count_owners(sc->sr.rmap_cur, bno, len, oinfo, &res); in xchk_xref_is_only_rt_owned_by()
315 if (!xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur)) in xchk_xref_is_only_rt_owned_by()
318 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_is_only_rt_owned_by()
320 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_is_only_rt_owned_by()
322 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_xref_is_only_rt_owned_by()