Lines Matching refs:sc

22 	struct xfs_scrub	*sc,  in xchk_setup_rt()  argument
27 error = xchk_setup_fs(sc, ip); in xchk_setup_rt()
31 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP; in xchk_setup_rt()
32 sc->ip = sc->mp->m_rbmip; in xchk_setup_rt()
33 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_setup_rt()
47 struct xfs_scrub *sc = priv; in xchk_rtbitmap_rec() local
55 !xfs_verify_rtbno(sc->mp, startblock) || in xchk_rtbitmap_rec()
56 !xfs_verify_rtbno(sc->mp, startblock + blockcount - 1)) in xchk_rtbitmap_rec()
57 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_rtbitmap_rec()
64 struct xfs_scrub *sc) in xchk_rtbitmap() argument
69 error = xchk_metadata_inode_forks(sc); in xchk_rtbitmap()
70 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
73 error = xfs_rtalloc_query_all(sc->tp, xchk_rtbitmap_rec, sc); in xchk_rtbitmap()
74 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_rtbitmap()
84 struct xfs_scrub *sc) in xchk_rtsummary() argument
86 struct xfs_inode *rsumip = sc->mp->m_rsumip; in xchk_rtsummary()
87 struct xfs_inode *old_ip = sc->ip; in xchk_rtsummary()
88 uint old_ilock_flags = sc->ilock_flags; in xchk_rtsummary()
98 sc->ip = rsumip; in xchk_rtsummary()
99 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM; in xchk_rtsummary()
100 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_rtsummary()
103 error = xchk_metadata_inode_forks(sc); in xchk_rtsummary()
104 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtsummary()
108 xchk_set_incomplete(sc); in xchk_rtsummary()
111 xfs_iunlock(sc->ip, sc->ilock_flags); in xchk_rtsummary()
112 sc->ilock_flags = old_ilock_flags; in xchk_rtsummary()
113 sc->ip = old_ip; in xchk_rtsummary()
121 struct xfs_scrub *sc, in xchk_xref_is_used_rt_space() argument
131 if (xchk_skip_xref(sc->sm)) in xchk_xref_is_used_rt_space()
136 do_div(startext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
137 do_div(endext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
139 xfs_ilock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()
140 error = xfs_rtalloc_extent_is_free(sc->mp, sc->tp, startext, extcount, in xchk_xref_is_used_rt_space()
142 if (!xchk_should_check_xref(sc, &error, NULL)) in xchk_xref_is_used_rt_space()
145 xchk_ino_xref_set_corrupt(sc, sc->mp->m_rbmip->i_ino); in xchk_xref_is_used_rt_space()
147 xfs_iunlock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()