qemu-e2k/hw/ide
Christoph Hellwig e900a7b748 block: add enable_write_cache flag
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>
2009-09-11 10:19:46 -05:00
..
core.c block: add enable_write_cache flag 2009-09-11 10:19:46 -05:00
internal.h ide: move cmd+irq from IDEState to IDEBus. 2009-09-04 09:37:27 -05:00
isa.c ide: pass down DriveInfo instead of BlockDriverState 2009-09-04 09:37:27 -05:00
macio.c ide: move cmd+irq from IDEState to IDEBus. 2009-09-04 09:37:27 -05:00
microdrive.c ide: pass down DriveInfo instead of BlockDriverState 2009-09-04 09:37:27 -05:00
mmio.c ide: pass down DriveInfo instead of BlockDriverState 2009-09-04 09:37:27 -05:00
pci.c mips malta: Fix fdc regression and use qdev for i8042 setup 2009-09-04 09:37:34 -05:00