• C
    block: add enable_write_cache flag · e900a7b7
    Christoph Hellwig 提交于
    Add a enable_write_cache flag in the block driver state, and use it to
    decide if we claim to have a volatile write cache that needs controlled
    flushing from the guest.  The flag is off if cache=writethrough is
    defined because O_DSYNC guarantees that every write goes to stable
    storage, and it is on for cache=none and cache=writeback.
    
    Both scsi-disk and ide now use the new flage, changing from their
    defaults of always off (ide) or always on (scsi-disk).
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
    e900a7b7
block.h 7.6 KB