virt-manager/virtinst-add-cache-modes.patch

29 lines
1.3 KiB
Diff
Raw Normal View History

Index: virt-manager-0.10.0/virtinst/VirtualDisk.py
===================================================================
--- virt-manager-0.10.0.orig/virtinst/VirtualDisk.py
+++ virt-manager-0.10.0/virtinst/VirtualDisk.py
@@ -312,10 +312,13 @@ class VirtualDisk(VirtualDevice):
driver_types = [DRIVER_TAP_RAW, DRIVER_TAP_QCOW,
DRIVER_TAP_QED, DRIVER_TAP_VMDK, DRIVER_TAP_VDISK]
+ CACHE_MODE_DIRECTSYNC = "directsync"
CACHE_MODE_NONE = "none"
+ CACHE_MODE_UNSAFE = "unsafe"
CACHE_MODE_WRITETHROUGH = "writethrough"
CACHE_MODE_WRITEBACK = "writeback"
- cache_types = [CACHE_MODE_NONE, CACHE_MODE_WRITETHROUGH,
+ cache_types = [CACHE_MODE_DIRECTSYNC, CACHE_MODE_NONE,
+ CACHE_MODE_UNSAFE, CACHE_MODE_WRITETHROUGH,
CACHE_MODE_WRITEBACK]
DEVICE_DISK = "disk"
@@ -599,7 +602,7 @@ class VirtualDisk(VirtualDevice):
@type bus: C{str}
@param shareable: If disk can be shared among VMs
@type shareable: C{bool}
- @param driverCache: Disk cache mode (none, writethrough, writeback)
+ @param driverCache: Disk cache mode (none, directsync, unsafe, writethrough, writeback)
@type driverCache: member of cache_types
@param format: Storage volume format to use when creating storage
@type format: C{str}