Lines Matching +full:look +full:- +full:up
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2017-2023 Oracle. All Rights Reserved.
21 /* Set us up to scrub parents. */
31 /* Look for an entry in a parent pointing to this inode. */
38 /* Look for a single entry in a directory pointing to an inode. */
52 if (!xfs_dir2_namecheck(name->name, name->len)) in xchk_parent_actor()
53 error = -EFSCORRUPTED; in xchk_parent_actor()
57 if (sc->ip->i_ino == ino) in xchk_parent_actor()
58 spc->nlink++; in xchk_parent_actor()
60 if (xchk_should_terminate(spc->sc, &error)) in xchk_parent_actor()
77 if (!xfs_need_iread_extents(&dp->i_df)) in xchk_parent_ilock_dir()
91 * back to the inode being scrubbed. Returns -EAGAIN if we need to revalidate
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()
118 if (sc->ip->i_ino == parent_ino) { in xchk_parent_validate()
127 expected_nlink = VFS_I(sc->ip)->i_nlink == 0 ? 0 : 1; in xchk_parent_validate()
133 * If _iget returns -EINVAL or -ENOENT then the parent inode number is in xchk_parent_validate()
135 * -EFSCORRUPTED or -EFSBADCRC then the parent is corrupt which is a in xchk_parent_validate()
139 if (error == -EINVAL || error == -ENOENT) { in xchk_parent_validate()
140 error = -EFSCORRUPTED; in xchk_parent_validate()
146 if (dp == sc->ip || !S_ISDIR(VFS_I(dp)->i_mode)) { in xchk_parent_validate()
155 error = -EAGAIN; in xchk_parent_validate()
159 /* Look for a directory entry in the parent pointing to the child. */ in xchk_parent_validate()
183 struct xfs_mount *mp = sc->mp; in xchk_parent()
188 * If we're a directory, check that the '..' link points up to in xchk_parent()
191 if (!S_ISDIR(VFS_I(sc->ip)->i_mode)) in xchk_parent()
192 return -ENOENT; in xchk_parent()
195 if (!xfs_verify_dir_ino(mp, sc->ip->i_ino)) { in xchk_parent()
204 /* Look up '..' */ in xchk_parent()
205 error = xchk_dir_lookup(sc, sc->ip, &xfs_name_dotdot, in xchk_parent()
219 } while (error == -EAGAIN); in xchk_parent()