diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:07:54 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:06 -0800 |
commit | bf112bef9730c4b21bac704ee5673084dfd36d81 (patch) | |
tree | 980bf4468ec5b0a0c3d80f239d97561a966d4809 /fs/xfs/xfs_mount.c | |
parent | 349c4454d0fb57fce8fda412ca8bc9350f59f17c (diff) |
xfs: create imeta abstractions to get and set metadata inodes
Create some helper routines to get and set metadata inode numbers
instead of open-coding them throughout xfs.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_mount.c')
-rw-r--r-- | fs/xfs/xfs_mount.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c index 490bf1266661..a53e6aa54675 100644 --- a/fs/xfs/xfs_mount.c +++ b/fs/xfs/xfs_mount.c @@ -33,6 +33,7 @@ #include "xfs_health.h" #include "xfs_trace.h" #include "xfs_ag.h" +#include "xfs_imeta.h" static DEFINE_MUTEX(xfs_uuid_table_mutex); static int xfs_uuid_table_size; @@ -514,6 +515,22 @@ xfs_check_summary_counts( return xfs_initialize_perag_data(mp, mp->m_sb.sb_agcount); } +STATIC int +xfs_mountfs_imeta( + struct xfs_mount *mp) +{ + int error; + + error = xfs_imeta_mount(mp); + if (error) { + xfs_warn(mp, "Failed to load metadata inode info, error %d", + error); + return error; + } + + return 0; +} + /* * Flush and reclaim dirty inodes in preparation for unmount. Inodes and * internal inode structures can be sitting in the CIL and AIL at this point, @@ -807,6 +824,11 @@ xfs_mountfs( mp->m_features |= XFS_FEAT_ATTR2; } + /* Load the metadata directory tree. */ + error = xfs_mountfs_imeta(mp); + if (error) + goto out_log_dealloc; + /* * Get and sanity-check the root inode. * Save the pointer to it in the mount structure. |