From: Darrick J. Wong Date: Mon, 25 Nov 2024 21:14:16 +0000 (-0800) Subject: xfs: rename metadata inode predicates X-Git-Tag: v6.13.0~187 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ffcb97b2320bdb146f3541cfaf984ede86576511;p=thirdparty%2Fxfsprogs-dev.git xfs: rename metadata inode predicates Source kernel commit: 4d272929a5258074328dae206c935634e0fd1a54 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: Darrick J. Wong Reviewed-by: Christoph Hellwig --- diff --git a/libxfs/libxfs_api_defs.h b/libxfs/libxfs_api_defs.h index 483a7a9a..92e26eeb 100644 --- a/libxfs/libxfs_api_defs.h +++ b/libxfs/libxfs_api_defs.h @@ -199,7 +199,7 @@ #define xfs_inode_validate_cowextsize libxfs_inode_validate_cowextsize #define xfs_inode_validate_extsize libxfs_inode_validate_extsize -#define xfs_internal_inum libxfs_internal_inum +#define xfs_is_sb_inum libxfs_is_sb_inum #define xfs_iread_extents libxfs_iread_extents #define xfs_irele libxfs_irele diff --git a/libxfs/xfs_types.c b/libxfs/xfs_types.c index 0d1b86ae..a70c0395 100644 --- a/libxfs/xfs_types.c +++ b/libxfs/xfs_types.c @@ -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); } diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h index d3cb6ff3..25053a66 100644 --- a/libxfs/xfs_types.h +++ b/libxfs/xfs_types.h @@ -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, diff --git a/repair/rmap.c b/repair/rmap.c index 29af74ee..3b998a22 100644 --- a/repair/rmap.c +++ b/repair/rmap.c @@ -814,7 +814,7 @@ rmap_shareable( return false; /* Metadata in files are never shareable */ - if (libxfs_internal_inum(mp, rmap->rm_owner)) + if (libxfs_is_sb_inum(mp, rmap->rm_owner)) return false; /* Metadata and unwritten file blocks are not shareable. */