]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
fixups xfs-rtg-xarray
authorChristoph Hellwig <hch@lst.de>
Tue, 20 Aug 2024 11:57:38 +0000 (13:57 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 20 Aug 2024 11:59:32 +0000 (13:59 +0200)
include/xfs_mount.h
libxfs/init.c

index 31af535cdb093cdf879bad293d31bce49a869741..a523055b923bbba6c1ea1668d23eccb9588ae78b 100644 (file)
@@ -96,7 +96,7 @@ typedef struct xfs_mount {
        uint                    m_alloc_set_aside; /* space we can't use */
        uint                    m_ag_max_usable; /* max space per AG */
        struct radix_tree_root  m_perag_tree;
-       struct radix_tree_root  m_rtgroup_tree;
+       struct xarray           m_rtgroups;
        uint64_t                m_features;     /* active filesystem features */
        uint64_t                m_low_space[XFS_LOWSP_MAX];
        uint64_t                m_rtxblkmask;   /* rt extent block mask */
@@ -137,7 +137,6 @@ typedef struct xfs_mount {
         */
        atomic64_t              m_allocbt_blks;
        spinlock_t              m_perag_lock;   /* lock for m_perag_tree */
-       spinlock_t              m_rtgroup_lock; /* lock for m_rtgroup_tree */
 
 } xfs_mount_t;
 
index 764c464589ffe2c331caf4efa18082163c11e9e6..577f1b6828206cf377e70a63800e290ae28519ae 100644 (file)
@@ -735,11 +735,10 @@ libxfs_mount(
        xfs_set_inode32(mp);
        mp->m_sb = *sb;
        INIT_RADIX_TREE(&mp->m_perag_tree, GFP_KERNEL);
-       INIT_RADIX_TREE(&mp->m_rtgroup_tree, GFP_KERNEL);
+       xa_init(&mp->m_rtgroups);
        sbp = &mp->m_sb;
        spin_lock_init(&mp->m_sb_lock);
        spin_lock_init(&mp->m_agirotor_lock);
-       spin_lock_init(&mp->m_rtgroup_lock);
 
        xfs_sb_mount_common(mp, sb);