• Dave Chinner's avatar
    xfs: return a referenced perag from filestreams allocator · f8f1ed1a
    Dave Chinner authored
    Now that the filestreams AG selection tracks active perags, we need
    to return an active perag to the core allocator code. This is
    because the file allocation the filestreams code will run are AG
    specific allocations and so need to pin the AG until the allocations
    complete.
    
    We cannot rely on the filestreams item reference to do this - the
    filestreams association can be torn down at any time, hence we
    need to have a separate reference for the allocation process to pin
    the AG after it has been selected.
    
    This means there is some perag juggling in allocation failure
    fallback paths as they will do all AG scans in the case the AG
    specific allocation fails. Hence we need to track the perag
    reference that the filestream allocator returned to make sure we
    don't leak it on repeated allocation failure.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
    f8f1ed1a
xfs_bmap.c 165 KB