]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: rename metadata inode predicates
authorDarrick J. Wong <djwong@kernel.org>
Mon, 25 Nov 2024 21:14:16 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:24 +0000 (18:01 -0800)
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 <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/libxfs_api_defs.h
libxfs/xfs_types.c
libxfs/xfs_types.h
repair/rmap.c

index 483a7a9a4cbf45ada2c56e25477144c68b5db207..92e26eebabfed87282fbaafb8569037659bf5d6b 100644 (file)
 #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
index 0d1b86ae59d93e3d6122e3282c7d18356fcf536f..a70c0395979cf89aaa5e71592f8b9d2586ebdfa3 100644 (file)
@@ -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);
 }
index d3cb6ff3b913014c3b0817d6189804168969388f..25053a66c225ed257e099a1e7f26f00bc6827f1c 100644 (file)
@@ -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,
index 29af74eee118317c3cfa42e52215ff1e69f6020b..3b998a22cee10db2182e7c99abacd346a62f7daf 100644 (file)
@@ -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. */