• Christoph Hellwig's avatar
    virtio_blk: support barriers without FLUSH feature · 10bc310c
    Christoph Hellwig authored
    If we want to support barriers with the cache=writethrough mode in qemu
    we need to tell the block layer that we only need queue drains to
    implement a barrier.  Follow the model set by SCSI and IDE and assume
    that there is no volatile write cache if the host doesn't advertize it.
    While this might imply working barriers on old qemu versions or other
    hypervisors that actually have a volatile write cache this is only a
    cosmetic issue - these hypervisors don't guarantee any data integrity
    with or without this patch, but with the patch we at least provide
    data ordering.
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    10bc310c
virtio_blk.c 13.9 KB