summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-11-03 20:19:04 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-11-05 13:38:35 -0800
commit87fe4c34a383d51ec75f254240bcd08828f4ce5a (patch)
treec5f4a1110a701ae4f94a40f60a7c232c2cf992e9 /fs/xfs/xfs_rtalloc.c
parentdcfc65befb76dfcb6fa1e49a3c2cc60f3f53a337 (diff)
xfs: create incore realtime group structures
Create an incore object that will contain information about a realtime allocation group. This will eventually enable us to shard the realtime section in a similar manner to how we shard the data section, but for now just a single object for the entire RT subvolume is created. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index 46a920b192d1..917c1a5e8f31 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -27,6 +27,7 @@
#include "xfs_health.h"
#include "xfs_da_format.h"
#include "xfs_metafile.h"
+#include "xfs_rtgroup.h"
/*
* Return whether there are any free extents in the size range given
@@ -1136,6 +1137,7 @@ xfs_rtmount_inodes(
{
struct xfs_trans *tp;
struct xfs_sb *sbp = &mp->m_sb;
+ struct xfs_rtgroup *rtg = NULL;
int error;
error = xfs_trans_alloc_empty(mp, &tp);
@@ -1166,6 +1168,9 @@ xfs_rtmount_inodes(
if (error)
goto out_rele_summary;
+ while ((rtg = xfs_rtgroup_next(mp, rtg)))
+ rtg->rtg_extents = xfs_rtgroup_extents(mp, rtg_rgno(rtg));
+
error = xfs_alloc_rsum_cache(mp, sbp->sb_rbmblocks);
if (error)
goto out_rele_summary;