mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-11 05:17:59 +03:00
cli: disk: add driver_detect_zeroes= support
This commit is contained in:
parent
640e559774
commit
c6fdfbf3c3
@ -35,7 +35,7 @@
|
||||
<boot order="2"/>
|
||||
</disk>
|
||||
<disk type="file" device="disk">
|
||||
<driver name="qemu" type="qcow2" discard="unmap" error_policy="enospace"/>
|
||||
<driver name="qemu" type="qcow2" discard="unmap" detect_zeroes="yes" error_policy="enospace"/>
|
||||
<source file="/dev/default-pool/new1.img"/>
|
||||
<target dev="vdb" bus="virtio"/>
|
||||
<readonly/>
|
||||
|
@ -455,7 +455,7 @@ c.add_compare(""" \
|
||||
--cpu none \
|
||||
\
|
||||
--disk %(EXISTUPPER)s,cache=writeback,io=threads,perms=sh,serial=WD-WMAP9A966149,boot_order=2 \
|
||||
--disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace,discard=unmap \
|
||||
--disk %(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace,discard=unmap,detect_zeroes=yes \
|
||||
--disk device=cdrom,bus=sata,read_bytes_sec=1,read_iops_sec=2,total_bytes_sec=10,total_iops_sec=20,write_bytes_sec=5,write_iops_sec=6 \
|
||||
--disk size=1 \
|
||||
--disk %(BLOCKVOL)s \
|
||||
|
@ -2074,6 +2074,7 @@ ParserDisk.add_arg("bus", "bus")
|
||||
ParserDisk.add_arg("removable", "removable", is_onoff=True)
|
||||
ParserDisk.add_arg("driver_cache", "cache")
|
||||
ParserDisk.add_arg("driver_discard", "discard")
|
||||
ParserDisk.add_arg("driver_detect_zeroes", "detect_zeroes")
|
||||
ParserDisk.add_arg("driver_name", "driver_name")
|
||||
ParserDisk.add_arg("driver_type", "driver_type")
|
||||
ParserDisk.add_arg("driver_io", "io")
|
||||
|
@ -470,7 +470,8 @@ class VirtualDisk(VirtualDevice):
|
||||
_XML_PROP_ORDER = [
|
||||
"type", "device",
|
||||
"driver_name", "driver_type",
|
||||
"driver_cache", "driver_discard", "driver_io", "error_policy",
|
||||
"driver_cache", "driver_discard", "driver_detect_zeroes",
|
||||
"driver_io", "error_policy",
|
||||
"_source_file", "_source_dev", "_source_dir",
|
||||
"source_volume", "source_pool", "source_protocol", "source_name",
|
||||
"source_host_name", "source_host_port",
|
||||
@ -741,6 +742,7 @@ class VirtualDisk(VirtualDevice):
|
||||
shareable = XMLProperty("./shareable", is_bool=True)
|
||||
driver_cache = XMLProperty("./driver/@cache")
|
||||
driver_discard = XMLProperty("./driver/@discard")
|
||||
driver_detect_zeroes = XMLProperty("./driver/@detect_zeroes")
|
||||
driver_io = XMLProperty("./driver/@io")
|
||||
|
||||
error_policy = XMLProperty("./driver/@error_policy")
|
||||
|
Loading…
Reference in New Issue
Block a user