summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_buf.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-20 16:20:27 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-12-23 13:06:05 -0800
commit6b08901a6e8fcda555f3ad39abd73bb0dd37f231 (patch)
tree96a2e90bfb0fb89a53de83bf59464bf0921163c8 /fs/xfs/libxfs/xfs_inode_buf.c
parent702c90f451622384d6c65897b619f647704b06a9 (diff)
xfs: add realtime reverse map inode to metadata directory
Add a metadir path to select the realtime rmap btree inode and load it at mount time. The rtrmapbt inode will have a unique extent format code, which means that we also have to update the inode validation and flush routines to look for it. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.c')
-rw-r--r--fs/xfs/libxfs/xfs_inode_buf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c
index 1648d72d6ed9..17cb91b89fca 100644
--- a/fs/xfs/libxfs/xfs_inode_buf.c
+++ b/fs/xfs/libxfs/xfs_inode_buf.c
@@ -447,6 +447,15 @@ xfs_dinode_verify_fork(
if (!(dip->di_flags2 & cpu_to_be64(XFS_DIFLAG2_METADATA)))
return __this_address;
switch (be16_to_cpu(dip->di_metatype)) {
+ case XFS_METAFILE_RTRMAP:
+ /*
+ * growfs must create the rtrmap inodes before adding a
+ * realtime volume to the filesystem, so we cannot use
+ * the rtrmapbt predicate here.
+ */
+ if (!xfs_has_rmapbt(mp))
+ return __this_address;
+ break;
default:
return __this_address;
}