]> git.apps.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: switch perag iteration from the for_each macros to a while based iterator
authorChristoph Hellwig <hch@lst.de>
Mon, 25 Nov 2024 21:14:14 +0000 (13:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:24 +0000 (18:01 -0800)
commit4f87efa3a68d2ff7d59e91bee46d82ac3b66274a
tree0322cfe380885c5666206a2d8752caad902ac6ee
parent4a384bc53d5a952b35f3c6a85a36f8d97e9f2472
xfs: switch perag iteration from the for_each macros to a while based iterator

Source kernel commit: 86437e6abbd2ef040f42ef190264819db6118415

The current for_each_perag* macros are a bit annoying in that they
require the caller to both provide an object and an index iterator, and
also somewhat obsfucate the underlying control flow mechanism.

Switch to open coded while loops using new xfs_perag_next{,_from,_range}
helpers that return the next pag structure to iterate on based on the
previous one or NULL for the loop start.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/fsmap.c
db/info.c
db/iunlink.c
libxfs/xfs_ag.h
libxfs/xfs_sb.c
libxfs/xfs_types.c
repair/bmap_repair.c
repair/phase2.c
repair/phase5.c