• Brian Foster's avatar
    xfs: skip small alloc cntbt logic on NULL cursor · 6691cd92
    Brian Foster authored
    The small allocation helper is implemented in a way that is fairly
    tightly integrated to the existing allocation algorithms. It expects
    a cntbt cursor beyond the end of the tree, attempts to locate the
    last record in the tree and only attempts an AGFL allocation if the
    cntbt is empty.
    
    The upcoming generic algorithm doesn't rely on the cntbt processing
    of this function. It will only call this function when the cntbt
    doesn't have a big enough extent or is empty and thus AGFL
    allocation is the only remaining option. Tweak
    xfs_alloc_ag_vextent_small() to handle a NULL cntbt cursor and skip
    the cntbt logic. This facilitates use by the existing allocation
    code and new code that only requires an AGFL allocation attempt.
    Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
    6691cd92
xfs_alloc.c 87.1 KB