Lines Matching refs:sr
714 struct xchk_rt *sr) in xchk_rtgroup_init() argument
716 ASSERT(sr->rtg == NULL); in xchk_rtgroup_init()
717 ASSERT(sr->rtlock_flags == 0); in xchk_rtgroup_init()
719 sr->rtg = xfs_rtgroup_get(sc->mp, rgno); in xchk_rtgroup_init()
720 if (!sr->rtg) in xchk_rtgroup_init()
729 struct xchk_rt *sr, in xchk_rtgroup_lock() argument
734 ASSERT(sr->rtg != NULL); in xchk_rtgroup_lock()
743 xfs_rtgroup_lock(sr->rtg, rtglock_flags); in xchk_rtgroup_lock()
744 sr->rtlock_flags = rtglock_flags; in xchk_rtgroup_lock()
752 xfs_rtgroup_lock(sr->rtg, rtglock_flags); in xchk_rtgroup_lock()
781 if (!xfs_group_intent_busy(rtg_group(sr->rtg))) in xchk_rtgroup_lock()
784 xfs_rtgroup_unlock(sr->rtg, rtglock_flags); in xchk_rtgroup_lock()
788 error = xfs_group_intent_drain(rtg_group(sr->rtg)); in xchk_rtgroup_lock()
796 sr->rtlock_flags = rtglock_flags; in xchk_rtgroup_lock()
799 sr->rmap_cur = xfs_rtrmapbt_init_cursor(sc->tp, sr->rtg); in xchk_rtgroup_lock()
802 sr->refc_cur = xfs_rtrefcountbt_init_cursor(sc->tp, sr->rtg); in xchk_rtgroup_lock()
814 struct xchk_rt *sr) in xchk_rtgroup_btcur_free() argument
816 if (sr->rmap_cur) in xchk_rtgroup_btcur_free()
817 xfs_btree_del_cursor(sr->rmap_cur, XFS_BTREE_ERROR); in xchk_rtgroup_btcur_free()
818 if (sr->refc_cur) in xchk_rtgroup_btcur_free()
819 xfs_btree_del_cursor(sr->refc_cur, XFS_BTREE_ERROR); in xchk_rtgroup_btcur_free()
821 sr->refc_cur = NULL; in xchk_rtgroup_btcur_free()
822 sr->rmap_cur = NULL; in xchk_rtgroup_btcur_free()
831 struct xchk_rt *sr) in xchk_rtgroup_unlock() argument
833 ASSERT(sr->rtg != NULL); in xchk_rtgroup_unlock()
835 if (sr->rtlock_flags) { in xchk_rtgroup_unlock()
836 xfs_rtgroup_unlock(sr->rtg, sr->rtlock_flags); in xchk_rtgroup_unlock()
837 sr->rtlock_flags = 0; in xchk_rtgroup_unlock()
848 struct xchk_rt *sr) in xchk_rtgroup_free() argument
850 ASSERT(sr->rtg != NULL); in xchk_rtgroup_free()
852 xchk_rtgroup_unlock(sr); in xchk_rtgroup_free()
854 xfs_rtgroup_put(sr->rtg); in xchk_rtgroup_free()
855 sr->rtg = NULL; in xchk_rtgroup_free()
1689 if (!sc->sr.rtg) { in xchk_meta_btree_count_blocks()
1696 cur = xfs_rtrmapbt_init_cursor(sc->tp, sc->sr.rtg); in xchk_meta_btree_count_blocks()
1699 cur = xfs_rtrefcountbt_init_cursor(sc->tp, sc->sr.rtg); in xchk_meta_btree_count_blocks()