direct-io.hg
changeset 15026:8226c26cff40
[qemu] Sync data to disk if write cache is disabled.
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
Signed-off-by: Christian Limpach <Christian.Limpach@xensource.com>
author | Christian Limpach <Christian.Limpach@xensource.com> |
---|---|
date | Thu May 10 13:57:13 2007 +0100 (2007-05-10) |
parents | 305e28c0ef9b |
children | 7da6d9c374be |
files | tools/ioemu/hw/ide.c |
line diff
1.1 --- a/tools/ioemu/hw/ide.c Wed May 09 22:50:26 2007 +0100 1.2 +++ b/tools/ioemu/hw/ide.c Thu May 10 13:57:13 2007 +0100 1.3 @@ -968,6 +968,9 @@ static void ide_write_dma_cb(void *opaqu 1.4 1.5 /* end of transfer ? */ 1.6 if (s->nsector == 0) { 1.7 + /* Ensure the data hit disk before telling the guest OS so. */ 1.8 + if (!s->write_cache) 1.9 + bdrv_flush(s->bs); 1.10 s->status = READY_STAT | SEEK_STAT; 1.11 ide_set_irq(s); 1.12 eot: