• Dave Chinner's avatar
    xfs: introduce xfs_for_each_perag_wrap() · 76257a15
    Dave Chinner authored
    In several places we iterate every AG from a specific start agno and
    wrap back to the first AG when we reach the end of the filesystem to
    continue searching. We don't have a primitive for this iteration
    yet, so add one for conversion of these algorithms to per-ag based
    iteration.
    
    The filestream AG select code is a mess, and this initially makes it
    worse. The per-ag selection needs to be driven completely into the
    filestream code to clean this up and it will be done in a future
    patch that makes the filestream allocator use active per-ag
    references correctly.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
    76257a15
xfs_ag.h 8.69 KB