Lines Matching full:sc

31 	struct xfs_scrub	*sc)  in xchk_setup_rtrefcountbt()  argument
35 if (xchk_need_intent_drain(sc)) in xchk_setup_rtrefcountbt()
36 xchk_fsgates_enable(sc, XCHK_FSGATES_DRAIN); in xchk_setup_rtrefcountbt()
38 if (xchk_could_repair(sc)) { in xchk_setup_rtrefcountbt()
39 error = xrep_setup_rtrefcountbt(sc); in xchk_setup_rtrefcountbt()
44 error = xchk_rtgroup_init(sc, sc->sm->sm_agno, &sc->sr); in xchk_setup_rtrefcountbt()
48 error = xchk_setup_rt(sc); in xchk_setup_rtrefcountbt()
52 error = xchk_install_live_inode(sc, rtg_refcount(sc->sr.rtg)); in xchk_setup_rtrefcountbt()
56 return xchk_rtgroup_lock(sc, &sc->sr, XCHK_RTGLOCK_ALL); in xchk_setup_rtrefcountbt()
103 struct xfs_scrub *sc; member
134 if (xchk_should_terminate(refchk->sc, &error)) in xchk_rtrefcountbt_rmap_check()
142 xchk_btree_xref_set_corrupt(refchk->sc, cur, 0); in xchk_rtrefcountbt_rmap_check()
300 struct xfs_scrub *sc, in xchk_rtrefcountbt_xref_rmap() argument
304 .sc = sc, in xchk_rtrefcountbt_xref_rmap()
316 if (!sc->sr.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_rtrefcountbt_xref_rmap()
326 error = xfs_rmap_query_range(sc->sr.rmap_cur, &low, &high, in xchk_rtrefcountbt_xref_rmap()
328 if (!xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur)) in xchk_rtrefcountbt_xref_rmap()
333 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_rtrefcountbt_xref_rmap()
345 struct xfs_scrub *sc, in xchk_rtrefcountbt_xref() argument
348 if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrefcountbt_xref()
351 xchk_xref_is_used_rt_space(sc, in xchk_rtrefcountbt_xref()
352 xfs_rgbno_to_rtb(sc->sr.rtg, irec->rc_startblock), in xchk_rtrefcountbt_xref()
354 xchk_rtrefcountbt_xref_rmap(sc, irec); in xchk_rtrefcountbt_xref()
400 if (bs->sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) in xchk_rtrefcountbt_check_mergeable()
404 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrefcountbt_check_mergeable()
430 struct xfs_scrub *sc, in xchk_rtrefcountbt_xref_gaps() argument
439 if (bno <= rrc->next_unshared_rgbno || !sc->sr.rmap_cur || in xchk_rtrefcountbt_xref_gaps()
440 xchk_skip_xref(sc->sm)) in xchk_rtrefcountbt_xref_gaps()
448 error = xfs_rmap_query_range(sc->sr.rmap_cur, &low, &high, in xchk_rtrefcountbt_xref_gaps()
451 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_rtrefcountbt_xref_gaps()
453 xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur); in xchk_rtrefcountbt_xref_gaps()
470 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrefcountbt_rec()
477 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrefcountbt_rec()
480 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrefcountbt_rec()
488 xchk_btree_set_corrupt(bs->sc, bs->cur, 0); in xchk_rtrefcountbt_rec()
492 xchk_rtrefcountbt_xref(bs->sc, &irec); in xchk_rtrefcountbt_rec()
500 xchk_rtrefcountbt_xref_gaps(bs->sc, rrc, irec.rc_startblock); in xchk_rtrefcountbt_rec()
511 struct xfs_scrub *sc, in xchk_refcount_xref_rmap() argument
519 if (!sc->sr.rmap_cur || !sc->sa.rmap_cur || xchk_skip_xref(sc->sm)) in xchk_refcount_xref_rmap()
523 error = xfs_btree_count_blocks(sc->sr.refc_cur, &refcbt_blocks); in xchk_refcount_xref_rmap()
524 if (!xchk_btree_process_error(sc, sc->sr.refc_cur, 0, &error)) in xchk_refcount_xref_rmap()
526 error = xchk_count_rmap_ownedby_ag(sc, sc->sa.rmap_cur, btree_oinfo, in xchk_refcount_xref_rmap()
528 if (!xchk_should_check_xref(sc, &error, &sc->sa.rmap_cur)) in xchk_refcount_xref_rmap()
531 xchk_btree_xref_set_corrupt(sc, sc->sa.rmap_cur, 0); in xchk_refcount_xref_rmap()
534 error = xchk_count_rmap_ownedby_ag(sc, sc->sr.rmap_cur, in xchk_refcount_xref_rmap()
536 if (!xchk_should_check_xref(sc, &error, &sc->sr.rmap_cur)) in xchk_refcount_xref_rmap()
539 xchk_btree_xref_set_corrupt(sc, sc->sr.rmap_cur, 0); in xchk_refcount_xref_rmap()
545 struct xfs_scrub *sc) in xchk_rtrefcountbt() argument
555 error = xchk_metadata_inode_forks(sc); in xchk_rtrefcountbt()
556 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtrefcountbt()
559 xfs_rmap_ino_bmbt_owner(&btree_oinfo, rtg_refcount(sc->sr.rtg)->i_ino, in xchk_rtrefcountbt()
561 error = xchk_btree(sc, sc->sr.refc_cur, xchk_rtrefcountbt_rec, in xchk_rtrefcountbt()
563 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtrefcountbt()
570 xchk_rtrefcountbt_xref_gaps(sc, &rrc, sc->mp->m_sb.sb_rblocks); in xchk_rtrefcountbt()
572 xchk_refcount_xref_rmap(sc, &btree_oinfo, rrc.cow_blocks); in xchk_rtrefcountbt()
580 struct xfs_scrub *sc, in xchk_xref_is_rt_cow_staging() argument
588 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_rt_cow_staging()
592 error = xfs_refcount_lookup_le(sc->sr.refc_cur, XFS_REFC_DOMAIN_COW, in xchk_xref_is_rt_cow_staging()
594 if (!xchk_should_check_xref(sc, &error, &sc->sr.refc_cur)) in xchk_xref_is_rt_cow_staging()
597 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_xref_is_rt_cow_staging()
601 error = xfs_refcount_get_rec(sc->sr.refc_cur, &rc, &has_refcount); in xchk_xref_is_rt_cow_staging()
602 if (!xchk_should_check_xref(sc, &error, &sc->sr.refc_cur)) in xchk_xref_is_rt_cow_staging()
605 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_xref_is_rt_cow_staging()
611 xchk_btree_xref_set_corrupt(sc, sc->sa.refc_cur, 0); in xchk_xref_is_rt_cow_staging()
615 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_xref_is_rt_cow_staging()
624 struct xfs_scrub *sc, in xchk_xref_is_not_rt_shared() argument
631 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_not_rt_shared()
634 error = xfs_refcount_has_records(sc->sr.refc_cur, in xchk_xref_is_not_rt_shared()
636 if (!xchk_should_check_xref(sc, &error, &sc->sr.refc_cur)) in xchk_xref_is_not_rt_shared()
639 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_xref_is_not_rt_shared()
645 struct xfs_scrub *sc, in xchk_xref_is_not_rt_cow_staging() argument
652 if (!sc->sr.refc_cur || xchk_skip_xref(sc->sm)) in xchk_xref_is_not_rt_cow_staging()
655 error = xfs_refcount_has_records(sc->sr.refc_cur, XFS_REFC_DOMAIN_COW, in xchk_xref_is_not_rt_cow_staging()
657 if (!xchk_should_check_xref(sc, &error, &sc->sr.refc_cur)) in xchk_xref_is_not_rt_cow_staging()
660 xchk_btree_xref_set_corrupt(sc, sc->sr.refc_cur, 0); in xchk_xref_is_not_rt_cow_staging()