]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
repair: stop tracking duplicate RT extents with rtgroups rtg-repair-cleanups
authorChristoph Hellwig <hch@lst.de>
Thu, 15 Aug 2024 07:43:48 +0000 (09:43 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 15 Aug 2024 13:00:31 +0000 (15:00 +0200)
Nothing ever looks them up, so don't bother with tracking them by
overloading the AG numbers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/incore_ext.c
repair/phase4.c

index a31ef066ef356c46da2d7e02bb9c7d2891069415..892f9d25588c118d2abb527f30d0e5c7792d0f63 100644 (file)
@@ -725,7 +725,7 @@ static avl64ops_t avl64_extent_tree_ops = {
 void
 incore_ext_init(xfs_mount_t *mp)
 {
-       xfs_agnumber_t agcount = mp->m_sb.sb_agcount + mp->m_sb.sb_rgcount;
+       xfs_agnumber_t agcount = mp->m_sb.sb_agcount;
        int i;
 
        pthread_mutex_init(&rt_ext_tree_lock, NULL);
@@ -778,10 +778,9 @@ incore_ext_init(xfs_mount_t *mp)
 void
 incore_ext_teardown(xfs_mount_t *mp)
 {
-       xfs_agnumber_t agcount = mp->m_sb.sb_agcount + mp->m_sb.sb_rgcount;
        xfs_agnumber_t i;
 
-       for (i = 0; i < agcount; i++)  {
+       for (i = 0; i < mp->m_sb.sb_agcount; i++)  {
                btree_destroy(dup_extent_trees[i]);
                free(extent_bno_ptrs[i]);
                free(extent_bcnt_ptrs[i]);
index 547199cea7faf9c5b41a3acc7052989bf48c72da..8275e69ac3409d02b4e0e0b685ae6676d1a4d098 100644 (file)
@@ -368,8 +368,12 @@ _("free space (%u,%u-%u) only seen by one free space btree\n"),
                case XR_E_FS_MAP:
                        break;
                case XR_E_MULT:
-                       add_dup_extent(agno + isrt ? mp->m_sb.sb_agcount : 0,
-                                       agbno, blen);
+                       /*
+                        * Nothing is searching for duplicate RT extents, so
+                        * don't bother tracking them.
+                        */
+                       if (!isrt)
+                               add_dup_extent(agno, agbno, blen);
                        break;
                case XR_E_BAD_STATE:
                default: