Lines Matching refs:refchk
102 struct xchk_refcnt_check *refchk = priv; in xchk_refcountbt_rmap_check() local
108 if (xchk_should_terminate(refchk->sc, &error)) in xchk_refcountbt_rmap_check()
112 rc_last = refchk->bno + refchk->len - 1; in xchk_refcountbt_rmap_check()
115 if (refchk->refcount == 1 && rec->rm_owner != XFS_RMAP_OWN_COW) { in xchk_refcountbt_rmap_check()
116 xchk_btree_xref_set_corrupt(refchk->sc, cur, 0); in xchk_refcountbt_rmap_check()
120 if (rec->rm_startblock <= refchk->bno && rm_last >= rc_last) { in xchk_refcountbt_rmap_check()
125 refchk->seen++; in xchk_refcountbt_rmap_check()
138 list_add_tail(&frag->list, &refchk->fragments); in xchk_refcountbt_rmap_check()
153 struct xchk_refcnt_check *refchk) in xchk_refcountbt_process_rmap_fragments() argument
164 target_nr = refchk->refcount - refchk->seen; in xchk_refcountbt_process_rmap_fragments()
181 list_for_each_entry(frag, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
192 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
193 if (frag->rm.rm_startblock > refchk->bno || nr > target_nr) in xchk_refcountbt_process_rmap_fragments()
209 while (!list_empty(&refchk->fragments)) { in xchk_refcountbt_process_rmap_fragments()
226 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
254 if (rbno < refchk->bno + refchk->len) in xchk_refcountbt_process_rmap_fragments()
258 refchk->seen = refchk->refcount; in xchk_refcountbt_process_rmap_fragments()
265 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
277 struct xchk_refcnt_check refchk = { in xchk_refcountbt_xref_rmap() local
299 INIT_LIST_HEAD(&refchk.fragments); in xchk_refcountbt_xref_rmap()
301 &xchk_refcountbt_rmap_check, &refchk); in xchk_refcountbt_xref_rmap()
305 xchk_refcountbt_process_rmap_fragments(&refchk); in xchk_refcountbt_xref_rmap()
306 if (irec->rc_refcount != refchk.seen) { in xchk_refcountbt_xref_rmap()
307 trace_xchk_refcount_incorrect(sc->sa.pag, irec, refchk.seen); in xchk_refcountbt_xref_rmap()
312 list_for_each_entry_safe(frag, n, &refchk.fragments, list) { in xchk_refcountbt_xref_rmap()