• Dave Chinner's avatar
    xfs: catch buffers written without verifiers attached · 400b9d88
    Dave Chinner authored
    We recently had a bug where buffers were slipping through log
    recovery without any verifier attached to them. This was resulting
    in on-disk CRC mismatches for valid data. Add some warning code to
    catch this occurrence so that we catch such bugs during development
    rather than not being aware they exist.
    
    Note that we cannot do this verification unconditionally as non-CRC
    filesystems don't always attach verifiers to the buffers being
    written. e.g. during log recovery we cannot identify all the
    different types of buffers correctly on non-CRC filesystems, so we
    can't attach the correct verifiers in all cases and so we don't
    attach any. Hence we don't want on non-CRC filesystems to avoid
    spamming the logs with false indications.
    Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
    Reviewed-by: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    400b9d88
xfs_buf.c 42.9 KB