-
Christoph Hellwig authored
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:
Christoph Hellwig <hch@lst.de>
Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>Christoph Hellwig authoredAdd 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:
Christoph Hellwig <hch@lst.de>
Signed-off-by:
Anthony Liguori <aliguori@us.ibm.com>
Loading