]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: pass the exact range to initialize to xfs_initialize_perag
authorChristoph Hellwig <hch@lst.de>
Sun, 8 Sep 2024 07:53:41 +0000 (10:53 +0300)
committerChristoph Hellwig <hch@lst.de>
Fri, 20 Sep 2024 12:04:53 +0000 (14:04 +0200)
commit72becb8941e97454c4c9c5481d326faa9004c867
tree372bc5305b58c0a67c403f99aa6b8e09766b5045
parent90fa22da6d6b41dc17435aff7b800f9ca3c00401
xfs: pass the exact range to initialize to xfs_initialize_perag

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>
fs/xfs/libxfs/xfs_ag.c
fs/xfs/libxfs/xfs_ag.h
fs/xfs/xfs_fsops.c
fs/xfs/xfs_log_recover.c
fs/xfs/xfs_mount.c