• Christoph Hellwig's avatar
    xfs: tune down agno asserts in the bmap code · 5d834e1a
    Christoph Hellwig authored
    commit 410d17f6 upstream.
    
    In various places we currently assert that xfs_bmap_btalloc allocates
    from the same as the firstblock value passed in, unless it's either
    NULLAGNO or the dop_low flag is set.  But the reflink code does not
    fully follow this convention as it passes in firstblock purely as
    a hint for the allocator without actually having previous allocations
    in the transaction, and without having a minleft check on the current
    AG, leading to the assert firing on a very full and heavily used
    file system.  As even the reflink code only allocates from equal or
    higher AGs for now we can simply the check to always allow for equal
    or higher AGs.
    
    Note that we need to eventually split the two meanings of the firstblock
    value.  At that point we can also allow the reflink code to allocate
    from any AG instead of limiting it in any way.
    Signed-off-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>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    5d834e1a
xfs_bmap.c 185 KB