]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: convert xfs_ialloc_next_ag() to an atomic
authorDave Chinner <dchinner@redhat.com>
Tue, 9 May 2023 09:29:48 +0000 (11:29 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 10 May 2023 08:13:12 +0000 (10:13 +0200)
commit887a7edd7d70577043dae314f5336befca995d3f
treeef21f86ed2bf8bff6d353005115e6ca1e4d633bd
parent87a02c9eea9d472b80fba1d66fbe3da5928052ab
xfs: convert xfs_ialloc_next_ag() to an atomic

Source kernel commit: 20a5eab49d354a2837e0af3f07f92a104de52804

This is currently a spinlock lock protected rotor which can be
implemented with a single atomic operation. Change it to be more
efficient and get rid of the m_agirotor_lock. Noticed while
converting the inode allocation AG selection loop to active perag
references.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_ialloc.c
libxfs/xfs_sb.c