mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
schema: Allow '0' offset for a <slice> of <disk>
Using slice to cut off the end of the image is a perfectly vaid configuration. Use 'unsignedInt' instead of 'positiveInteger' for the 'offset' attribute in the XML schema and modify one test case to cover this use case. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1960993 Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
4b3dc045b9
commit
fac773fab9
@ -1638,7 +1638,7 @@
|
|||||||
|
|
||||||
<define name="diskSourceSlice">
|
<define name="diskSourceSlice">
|
||||||
<attribute name="offset">
|
<attribute name="offset">
|
||||||
<ref name="positiveInteger"/>
|
<ref name="unsignedInt"/>
|
||||||
</attribute>
|
</attribute>
|
||||||
<attribute name="size">
|
<attribute name="size">
|
||||||
<ref name="positiveInteger"/>
|
<ref name="positiveInteger"/>
|
||||||
|
@ -28,7 +28,7 @@ XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
|||||||
-boot strict=on \
|
-boot strict=on \
|
||||||
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
||||||
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \
|
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-6-storage","auto-read-only":true,"discard":"unmap"}' \
|
||||||
-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw","offset":1234,"size":321,"file":"libvirt-6-storage"}' \
|
-blockdev '{"node-name":"libvirt-6-format","read-only":false,"driver":"raw","offset":0,"size":321,"file":"libvirt-6-storage"}' \
|
||||||
-device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-6-format,id=virtio-disk0,bootindex=1 \
|
-device virtio-blk-pci,bus=pci.0,addr=0x2,drive=libvirt-6-format,id=virtio-disk0,bootindex=1 \
|
||||||
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
|
-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/raw.img","node-name":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
|
||||||
-blockdev '{"driver":"raw","node-name":"libvirt-5-slice-sto","offset":9876,"size":123456789,"file":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
|
-blockdev '{"driver":"raw","node-name":"libvirt-5-slice-sto","offset":9876,"size":123456789,"file":"libvirt-5-storage","auto-read-only":true,"discard":"unmap"}' \
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<driver name='qemu' type='raw'/>
|
<driver name='qemu' type='raw'/>
|
||||||
<source file='/var/lib/libvirt/images/raw.img'>
|
<source file='/var/lib/libvirt/images/raw.img'>
|
||||||
<slices>
|
<slices>
|
||||||
<slice type='storage' offset='1234' size='321'/>
|
<slice type='storage' offset='0' size='321'/>
|
||||||
</slices>
|
</slices>
|
||||||
</source>
|
</source>
|
||||||
<backingStore/>
|
<backingStore/>
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<driver name='qemu' type='raw'/>
|
<driver name='qemu' type='raw'/>
|
||||||
<source file='/var/lib/libvirt/images/raw.img'>
|
<source file='/var/lib/libvirt/images/raw.img'>
|
||||||
<slices>
|
<slices>
|
||||||
<slice type='storage' offset='1234' size='321'/>
|
<slice type='storage' offset='0' size='321'/>
|
||||||
</slices>
|
</slices>
|
||||||
</source>
|
</source>
|
||||||
<backingStore/>
|
<backingStore/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user