* src/qemu_conf.c: switch off cache if disk is shared and not read-only

patch by Charles Duffy
Daniel
This commit is contained in:
Daniel Veillard 2008-11-03 15:58:02 +00:00
parent c1a9be4c1b
commit d9c75acde1
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Mon Nov 3 16:54:39 CET 2008 Daniel Veillard <veillard@redhat.com>
* src/qemu_conf.c: switch off cache if disk is shared and not read-only
patch by Charles Duffy
Mon Nov 3 16:52:12 CET 2008 Daniel Veillard <veillard@redhat.com>
* src/qemu_driver.c: oops trailing blanks

View File

@ -960,13 +960,15 @@ int qemudBuildCommandLine(virConnectPtr conn,
break;
}
snprintf(opt, PATH_MAX, "file=%s,if=%s,%sindex=%d%s",
snprintf(opt, PATH_MAX, "file=%s,if=%s,%sindex=%d%s%s",
disk->src ? disk->src : "", bus,
media ? media : "",
idx,
bootable &&
disk->device == VIR_DOMAIN_DISK_DEVICE_DISK
? ",boot=on" : "");
? ",boot=on" : "",
disk->shared && ! disk->readonly
? ",cache=off" : "");
ADD_ARG_LIT("-drive");
ADD_ARG_LIT(opt);