Commit 4d272929 authored by Darrick J. Wong's avatar Darrick J. Wong
Browse files

xfs: rename metadata inode predicates



The predicate xfs_internal_inum tells us if an inumber refers to one of
the inodes rooted in the superblock.  Soon we're going to have internal
inodes in a metadata directory tree, so this helper should be renamed
to capture its limited scope.

Ondisk inodes will soon have a flag to indicate that they're metadata
inodes.  Head off some confusion by renaming the xfs_is_metadata_inode
predicate to xfs_is_internal_inode.

Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent fdf5703b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ xfs_verify_ino(

/* Is this an internal inode number? */
inline bool
xfs_internal_inum(
xfs_is_sb_inum(
	struct xfs_mount	*mp,
	xfs_ino_t		ino)
{
@@ -129,7 +129,7 @@ xfs_verify_dir_ino(
	struct xfs_mount	*mp,
	xfs_ino_t		ino)
{
	if (xfs_internal_inum(mp, ino))
	if (xfs_is_sb_inum(mp, ino))
		return false;
	return xfs_verify_ino(mp, ino);
}
+1 −1
Original line number Diff line number Diff line
@@ -230,7 +230,7 @@ bool xfs_verify_fsbext(struct xfs_mount *mp, xfs_fsblock_t fsbno,
		xfs_fsblock_t len);

bool xfs_verify_ino(struct xfs_mount *mp, xfs_ino_t ino);
bool xfs_internal_inum(struct xfs_mount *mp, xfs_ino_t ino);
bool xfs_is_sb_inum(struct xfs_mount *mp, xfs_ino_t ino);
bool xfs_verify_dir_ino(struct xfs_mount *mp, xfs_ino_t ino);
bool xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
bool xfs_verify_rtbext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
+1 −1
Original line number Diff line number Diff line
@@ -948,7 +948,7 @@ xchk_iget_for_scrubbing(
		return xchk_install_live_inode(sc, ip_in);

	/* Reject internal metadata files and obviously bad inode numbers. */
	if (xfs_internal_inum(mp, sc->sm->sm_ino))
	if (xfs_is_sb_inum(mp, sc->sm->sm_ino))
		return -ENOENT;
	if (!xfs_verify_ino(sc->mp, sc->sm->sm_ino))
		return -ENOENT;
+1 −1
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ xchk_setup_inode(
	}

	/* Reject internal metadata files and obviously bad inode numbers. */
	if (xfs_internal_inum(mp, sc->sm->sm_ino))
	if (xfs_is_sb_inum(mp, sc->sm->sm_ino))
		return -ENOENT;
	if (!xfs_verify_ino(sc->mp, sc->sm->sm_ino))
		return -ENOENT;
+1 −1
Original line number Diff line number Diff line
@@ -1762,7 +1762,7 @@ xrep_inode_pptr(
	 * Metadata inodes are rooted in the superblock and do not have any
	 * parents.
	 */
	if (xfs_is_metadata_inode(ip))
	if (xfs_is_internal_inode(ip))
		return 0;

	/* Inode already has an attr fork; no further work possible here. */
Loading