Lines Matching full:sc

27 	struct xfs_scrub	*sc)  in xchk_setup_rtbitmap()  argument
29 struct xfs_mount *mp = sc->mp; in xchk_setup_rtbitmap()
36 sc->buf = rtb; in xchk_setup_rtbitmap()
38 if (xchk_could_repair(sc)) { in xchk_setup_rtbitmap()
39 error = xrep_setup_rtbitmap(sc, rtb); in xchk_setup_rtbitmap()
44 error = xchk_trans_alloc(sc, rtb->resblks); in xchk_setup_rtbitmap()
48 error = xchk_install_live_inode(sc, sc->mp->m_rbmip); in xchk_setup_rtbitmap()
52 error = xchk_ino_dqattach(sc); in xchk_setup_rtbitmap()
56 xchk_ilock(sc, XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP); in xchk_setup_rtbitmap()
81 struct xfs_scrub *sc = priv; in xchk_rtbitmap_rec() local
89 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_rtbitmap_rec()
96 struct xfs_scrub *sc) in xchk_rtbitmap_check_extents() argument
100 struct xfs_mount *mp = sc->mp; in xchk_rtbitmap_check_extents()
101 struct xfs_inode *ip = sc->ip; in xchk_rtbitmap_check_extents()
109 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, endoff); in xchk_rtbitmap_check_extents()
116 if (xchk_should_terminate(sc, &error) || in xchk_rtbitmap_check_extents()
117 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap_check_extents()
123 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, off, &error)) in xchk_rtbitmap_check_extents()
127 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, off); in xchk_rtbitmap_check_extents()
140 struct xfs_scrub *sc) in xchk_rtbitmap() argument
142 struct xfs_mount *mp = sc->mp; in xchk_rtbitmap()
143 struct xchk_rtbitmap *rtb = sc->buf; in xchk_rtbitmap()
148 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
154 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
163 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
167 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
173 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
183 xchk_ino_set_corrupt(sc, mp->m_rbmip->i_ino); in xchk_rtbitmap()
188 error = xchk_metadata_inode_forks(sc); in xchk_rtbitmap()
189 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
192 error = xchk_rtbitmap_check_extents(sc); in xchk_rtbitmap()
193 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
196 error = xfs_rtalloc_query_all(mp, sc->tp, xchk_rtbitmap_rec, sc); in xchk_rtbitmap()
197 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_rtbitmap()
206 struct xfs_scrub *sc, in xchk_xref_is_used_rt_space() argument
215 if (xchk_skip_xref(sc->sm)) in xchk_xref_is_used_rt_space()
218 startext = xfs_rtb_to_rtx(sc->mp, rtbno); in xchk_xref_is_used_rt_space()
219 endext = xfs_rtb_to_rtx(sc->mp, rtbno + len - 1); in xchk_xref_is_used_rt_space()
220 xfs_ilock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()
221 error = xfs_rtalloc_extent_is_free(sc->mp, sc->tp, startext, in xchk_xref_is_used_rt_space()
223 if (!xchk_should_check_xref(sc, &error, NULL)) in xchk_xref_is_used_rt_space()
226 xchk_ino_xref_set_corrupt(sc, sc->mp->m_rbmip->i_ino); in xchk_xref_is_used_rt_space()
228 xfs_iunlock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()