]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: pass the exact range to initialize to xfs_initialize_perag
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Oct 2024 05:11:47 +0000 (22:11 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 31 Oct 2024 22:45:04 +0000 (15:45 -0700)
commitaadfcab59975794adbe1d5371094186dc005a39e
treec5a0024ac0c190af8f87415a09cc43f82b7350ce
parent43f4e9bef3f5dc5e9c3d55ca30c33233d54b8ed7
xfs: pass the exact range to initialize to xfs_initialize_perag

Source kernel commit: 82742f8c3f1a93787a05a00aca50c2a565231f84

Currently only the new agcount is passed to xfs_initialize_perag, which
requires lookups of existing AGs to skip them and complicates error
handling.  Also pass the previous agcount so that the range that
xfs_initialize_perag operates on is exactly defined.  That way the
extra lookups can be avoided, and error handling can clean up the
exact range from the old count to the last added perag structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_ag.c
libxfs/xfs_ag.h