Lines Matching refs:sc

24 	struct xfs_scrub	*sc)  in xchk_setup_parent()  argument
26 return xchk_setup_inode_contents(sc, 0); in xchk_setup_parent()
34 struct xfs_scrub *sc; member
41 struct xfs_scrub *sc, in xchk_parent_actor() argument
54 if (!xchk_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_parent_actor()
57 if (sc->ip->i_ino == ino) in xchk_parent_actor()
60 if (xchk_should_terminate(spc->sc, &error)) in xchk_parent_actor()
96 struct xfs_scrub *sc, in xchk_parent_validate() argument
100 .sc = sc, in xchk_parent_validate()
103 struct xfs_mount *mp = sc->mp; in xchk_parent_validate()
110 if (sc->ip == mp->m_rootip) { in xchk_parent_validate()
111 if (sc->ip->i_ino != mp->m_sb.sb_rootino || in xchk_parent_validate()
112 sc->ip->i_ino != parent_ino) in xchk_parent_validate()
113 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent_validate()
118 if (sc->ip->i_ino == parent_ino) { in xchk_parent_validate()
119 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent_validate()
127 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; in xchk_parent_validate()
138 error = xchk_iget(sc, parent_ino, &dp); in xchk_parent_validate()
141 xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error); in xchk_parent_validate()
144 if (!xchk_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_parent_validate()
146 if (dp == sc->ip || !S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_parent_validate()
147 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent_validate()
153 xchk_iunlock(sc, XFS_ILOCK_EXCL); in xchk_parent_validate()
154 xchk_ilock(sc, XFS_ILOCK_EXCL); in xchk_parent_validate()
160 error = xchk_dir_walk(sc, dp, xchk_parent_actor, &spc); in xchk_parent_validate()
161 if (!xchk_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_parent_validate()
169 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent_validate()
174 xchk_irele(sc, dp); in xchk_parent_validate()
181 struct xfs_scrub *sc) in xchk_parent() argument
183 struct xfs_mount *mp = sc->mp; in xchk_parent()
191 if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) in xchk_parent()
195 if (!xfs_verify_dir_ino(mp, sc->ip->i_ino)) { in xchk_parent()
196 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent()
201 if (xchk_should_terminate(sc, &error)) in xchk_parent()
205 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, in xchk_parent()
207 if (!xchk_fblock_process_error(sc, XFS_DATA_FORK, 0, &error)) in xchk_parent()
210 xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); in xchk_parent()
218 error = xchk_parent_validate(sc, parent_ino); in xchk_parent()