]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: restore old agirotor behavior
authorDarrick J. Wong <djwong@kernel.org>
Tue, 9 May 2023 09:30:48 +0000 (11:30 +0200)
committerCarlos Maiolino <cem@kernel.org>
Wed, 10 May 2023 13:01:10 +0000 (15:01 +0200)
commit36076dc9a1e8ae003256617c94ae9dacbd707047
tree07afc462b01ed40a05c0efd19219a7e2e970c9bf
parentc371ca854a96a99f0b94e1f431975cefd88d60cd
xfs: restore old agirotor behavior

Source kernel commit: 6e2985c938e8b765b3de299c561d87f98330c546

Prior to the removal of xfs_ialloc_next_ag, we would increment the agi
rotor and return the *old* value.  atomic_inc_return returns the new
value, which causes mkfs to allocate the root directory in AG 1.  Put
back the old behavior (at least for mkfs) by subtracting 1 here.

Fixes: 20a5eab49d35 ("xfs: convert xfs_ialloc_next_ag() to an atomic")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_ialloc.c