• Dave Chinner's avatar
    xfs: prevent needless mount warning causing test failures · 81158e0c
    Dave Chinner authored
    Often mounting small filesystem with small logs will emit a warning
    such as:
    
    XFS (vdb): Invalid block length (0x2000) for buffer
    
    during log recovery. This causes tests to randomly fail because this
    output causes the clean filesystem checks on test completion to
    think the filesystem is inconsistent.
    
    The cause of the error is simply that log recovery is asking for a
    buffer size that is larger than the log when zeroing the tail. This
    is because the buffer size is rounded up, and if the right head and
    tail conditions exist then the buffer size can be larger than the log.
    Limit the variable size xlog_get_bp() callers to requesting buffers
    smaller than the log.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Signed-off-by: default avatarBen Myers <bpm@sgi.com>
    81158e0c
xfs_log_recover.c 105 KB