]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: restore old agirotor behavior
authorDarrick J. Wong <djwong@kernel.org>
Fri, 17 Feb 2023 23:45:51 +0000 (15:45 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 6 Apr 2023 00:05:55 +0000 (17:05 -0700)
commitcd1faa10b9c99de893e9738323810fc978941648
tree671636f1313cb438d775f082719a94c55d3a81b5
parent6f9eb130bc0ba9676dda3b7955f3174f3b189c30
xfs: restore old agirotor behavior

Source kernel commit: 127c6534882090d848652a723b436eaef90fce53

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>
libxfs/xfs_ialloc.c