• Darrick J. Wong's avatar
    xfs: adjust rt allocation minlen when extszhint > rtextsize · 9d5e8492
    Darrick J. Wong authored
    xfs_bmap_rtalloc doesn't handle realtime extent files with extent size
    hints larger than the rt volume's extent size properly, because
    xfs_bmap_extsize_align can adjust the offset/length parameters to try to
    fit the extent size hint.
    
    Under these conditions, minlen has to be large enough so that any
    allocation returned by xfs_rtallocate_extent will be large enough to
    cover at least one of the blocks that the caller asked for.  If the
    allocation is too short, bmapi_write will return no mapping for the
    requested range, which causes ENOSPC errors in other parts of the
    filesystem.
    
    Therefore, adjust minlen upwards to fix this.  This can be found by
    running generic/263 (g/127 or g/522) with a realtime extent size hint
    that's larger than the rt volume extent size.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarAllison Henderson <allison.henderson@oracle.com>
    9d5e8492
xfs_bmap_util.c 47.5 KB