]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: move extent busy tree initialization to xfs_initialize_perag
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 5 Oct 2018 02:36:11 +0000 (21:36 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 5 Oct 2018 02:36:11 +0000 (21:36 -0500)
Source kernel commit: ff23f4af7efd86cbb1bda42fe2171e0790f9cb5a

Move the per-AG busy extent tree initialization to the per-ag structure
initialization since we don't want online repair to leak the old tree.
We only deconstruct the tree at unmount time, so this should be safe.
This also enables us to eliminate the commented out initialization in
the xfsprogs libxfs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_alloc.c

index e1b2c0fbf0235ad53e221043e852b6b093d2f206..cbcf2346cdeb11b164bb5fbe68b0ea47c7a25624 100644 (file)
@@ -2751,10 +2751,6 @@ xfs_alloc_read_agf(
                pag->pagf_levels[XFS_BTNUM_RMAPi] =
                        be32_to_cpu(agf->agf_levels[XFS_BTNUM_RMAPi]);
                pag->pagf_refcount_level = be32_to_cpu(agf->agf_refcount_level);
-               spin_lock_init(&pag->pagb_lock);
-               pag->pagb_count = 0;
-               /* XXX: pagb_tree doesn't exist in userspace */
-               //pag->pagb_tree = RB_ROOT;
                pag->pagf_init = 1;
                pag->pagf_agflreset = xfs_agfl_needs_reset(mp, agf);
        }