Lines Matching refs:refchk
107 struct xchk_refcnt_check *refchk = priv; in xchk_refcountbt_rmap_check() local
113 if (xchk_should_terminate(refchk->sc, &error)) in xchk_refcountbt_rmap_check()
117 rc_last = refchk->bno + refchk->len - 1; in xchk_refcountbt_rmap_check()
120 if (refchk->refcount == 1 && rec->rm_owner != XFS_RMAP_OWN_COW) { in xchk_refcountbt_rmap_check()
121 xchk_btree_xref_set_corrupt(refchk->sc, cur, 0); in xchk_refcountbt_rmap_check()
125 if (rec->rm_startblock <= refchk->bno && rm_last >= rc_last) { in xchk_refcountbt_rmap_check()
130 refchk->seen++; in xchk_refcountbt_rmap_check()
143 list_add_tail(&frag->list, &refchk->fragments); in xchk_refcountbt_rmap_check()
158 struct xchk_refcnt_check *refchk) in xchk_refcountbt_process_rmap_fragments() argument
169 target_nr = refchk->refcount - refchk->seen; in xchk_refcountbt_process_rmap_fragments()
187 list_for_each_entry(frag, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
197 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
198 if (frag->rm.rm_startblock > refchk->bno) in xchk_refcountbt_process_rmap_fragments()
216 while (!list_empty(&refchk->fragments)) { in xchk_refcountbt_process_rmap_fragments()
233 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
261 if (rbno < refchk->bno + refchk->len) in xchk_refcountbt_process_rmap_fragments()
265 refchk->seen = refchk->refcount; in xchk_refcountbt_process_rmap_fragments()
272 list_for_each_entry_safe(frag, n, &refchk->fragments, list) { in xchk_refcountbt_process_rmap_fragments()
286 struct xchk_refcnt_check refchk = { in xchk_refcountbt_xref_rmap() local
308 INIT_LIST_HEAD(&refchk.fragments); in xchk_refcountbt_xref_rmap()
310 &xchk_refcountbt_rmap_check, &refchk); in xchk_refcountbt_xref_rmap()
314 xchk_refcountbt_process_rmap_fragments(&refchk); in xchk_refcountbt_xref_rmap()
315 if (refcount != refchk.seen) in xchk_refcountbt_xref_rmap()
319 list_for_each_entry_safe(frag, n, &refchk.fragments, list) { in xchk_refcountbt_xref_rmap()