forked from libvirt/libvirt
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
conf: Add support of zero-detection for disks
This option allows or disallows detection of zero-writes if it is set to "on" or "off", respectively. It can be also set to "unmap" in which case it will try discarding that part of image based on the value of the "discard" option. Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
- Loading branch information
Showing
8 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
tests/qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<domain type='qemu'> | ||
<name>test</name> | ||
<uuid>92d7a226-cfae-425b-a6d3-00bbf9ec5c9e</uuid> | ||
<memory unit='KiB'>1048576</memory> | ||
<currentMemory unit='KiB'>1048576</currentMemory> | ||
<vcpu placement='static'>1</vcpu> | ||
<os> | ||
<type arch='x86_64' machine='pc-0.13'>hvm</type> | ||
<boot dev='cdrom'/> | ||
<boot dev='hd'/> | ||
<bootmenu enable='yes'/> | ||
</os> | ||
<clock offset='utc'/> | ||
<on_poweroff>destroy</on_poweroff> | ||
<on_reboot>restart</on_reboot> | ||
<on_crash>restart</on_crash> | ||
<devices> | ||
<emulator>/usr/bin/qemu</emulator> | ||
<disk type='file' device='disk'> | ||
<driver name='qemu' type='qcow2' discard='unmap' detect_zeroes='unmap'/> | ||
<source file='/var/lib/libvirt/images/f14.img'/> | ||
<target dev='vda' bus='virtio'/> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> | ||
</disk> | ||
<disk type='file' device='cdrom'> | ||
<driver discard='ignore' detect_zeroes='off'/> | ||
<source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/> | ||
<target dev='hdc' bus='ide'/> | ||
<readonly/> | ||
<address type='drive' controller='0' bus='1' target='0' unit='0'/> | ||
</disk> | ||
<controller type='usb' index='0'> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> | ||
</controller> | ||
<controller type='ide' index='0'> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/> | ||
</controller> | ||
<controller type='pci' index='0' model='pci-root'/> | ||
<input type='mouse' bus='ps2'/> | ||
<input type='keyboard' bus='ps2'/> | ||
<memballoon model='virtio'> | ||
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | ||
</memballoon> | ||
</devices> | ||
</domain> |
1 change: 1 addition & 0 deletions
1
tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-detect-zeroes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../qemuxml2argvdata/qemuxml2argv-disk-drive-detect-zeroes.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters