• Home
  • Raw
  • Download

Lines Matching refs:sc

23 	struct xfs_scrub	*sc,  in xchk_setup_rt()  argument
28 error = xchk_setup_fs(sc, ip); in xchk_setup_rt()
32 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP; in xchk_setup_rt()
33 sc->ip = sc->mp->m_rbmip; in xchk_setup_rt()
34 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_setup_rt()
48 struct xfs_scrub *sc = priv; in xchk_rtbitmap_rec() local
56 !xfs_verify_rtbno(sc->mp, startblock) || in xchk_rtbitmap_rec()
57 !xfs_verify_rtbno(sc->mp, startblock + blockcount - 1)) in xchk_rtbitmap_rec()
58 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_rtbitmap_rec()
65 struct xfs_scrub *sc) in xchk_rtbitmap_check_extents() argument
67 struct xfs_mount *mp = sc->mp; in xchk_rtbitmap_check_extents()
74 if (xchk_should_terminate(sc, &error) || in xchk_rtbitmap_check_extents()
75 (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap_check_extents()
83 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, off, &error)) in xchk_rtbitmap_check_extents()
87 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, off); in xchk_rtbitmap_check_extents()
100 struct xfs_scrub *sc) in xchk_rtbitmap() argument
105 if (sc->mp->m_rbmip->i_d.di_size != in xchk_rtbitmap()
106 XFS_FSB_TO_B(sc->mp, sc->mp->m_sb.sb_rbmblocks)) { in xchk_rtbitmap()
107 xchk_ino_set_corrupt(sc, sc->mp->m_rbmip->i_ino); in xchk_rtbitmap()
112 error = xchk_metadata_inode_forks(sc); in xchk_rtbitmap()
113 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
116 error = xchk_rtbitmap_check_extents(sc); in xchk_rtbitmap()
117 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtbitmap()
120 error = xfs_rtalloc_query_all(sc->tp, xchk_rtbitmap_rec, sc); in xchk_rtbitmap()
121 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_rtbitmap()
131 struct xfs_scrub *sc) in xchk_rtsummary() argument
133 struct xfs_inode *rsumip = sc->mp->m_rsumip; in xchk_rtsummary()
134 struct xfs_inode *old_ip = sc->ip; in xchk_rtsummary()
135 uint old_ilock_flags = sc->ilock_flags; in xchk_rtsummary()
145 sc->ip = rsumip; in xchk_rtsummary()
146 sc->ilock_flags = XFS_ILOCK_EXCL | XFS_ILOCK_RTSUM; in xchk_rtsummary()
147 xfs_ilock(sc->ip, sc->ilock_flags); in xchk_rtsummary()
150 error = xchk_metadata_inode_forks(sc); in xchk_rtsummary()
151 if (error || (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT)) in xchk_rtsummary()
155 xchk_set_incomplete(sc); in xchk_rtsummary()
158 xfs_iunlock(sc->ip, sc->ilock_flags); in xchk_rtsummary()
159 sc->ilock_flags = old_ilock_flags; in xchk_rtsummary()
160 sc->ip = old_ip; in xchk_rtsummary()
168 struct xfs_scrub *sc, in xchk_xref_is_used_rt_space() argument
178 if (xchk_skip_xref(sc->sm)) in xchk_xref_is_used_rt_space()
183 do_div(startext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
184 do_div(endext, sc->mp->m_sb.sb_rextsize); in xchk_xref_is_used_rt_space()
186 xfs_ilock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()
187 error = xfs_rtalloc_extent_is_free(sc->mp, sc->tp, startext, extcount, in xchk_xref_is_used_rt_space()
189 if (!xchk_should_check_xref(sc, &error, NULL)) in xchk_xref_is_used_rt_space()
192 xchk_ino_xref_set_corrupt(sc, sc->mp->m_rbmip->i_ino); in xchk_xref_is_used_rt_space()
194 xfs_iunlock(sc->mp->m_rbmip, XFS_ILOCK_SHARED | XFS_ILOCK_RTBITMAP); in xchk_xref_is_used_rt_space()