• Darrick J. Wong's avatar
    xfs: fix unit conversion error in xfs_log_calc_max_attrsetm_res · 7ea816ca
    Darrick J. Wong authored
    Dave and I were discussing some recent test regressions as a result of
    me turning on nrext64=1 on realtime filesystems, when we noticed that
    the minimum log size of a 32M filesystem jumped from 954 blocks to 4287
    blocks.
    
    Digging through xfs_log_calc_max_attrsetm_res, Dave noticed that @size
    contains the maximum estimated amount of space needed for a local format
    xattr, in bytes, but we feed this quantity to XFS_NEXTENTADD_SPACE_RES,
    which requires units of blocks.  This has resulted in an overestimation
    of the minimum log size over the years.
    
    We should nominally correct this, but there's a backwards compatibility
    problem -- if we enable it now, the minimum log size will decrease.  If
    a corrected mkfs formats a filesystem with this new smaller log size, a
    user will encounter mount failures on an uncorrected kernel due to the
    larger minimum log size computations there.
    
    Therefore, turn this on for parent pointers because it wasn't merged at
    all upstream when this issue was discovered.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarAllison Henderson <allison.henderson@oracle.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    7ea816ca
xfs_log_rlimit.c 7.39 KB