|
|
d76c62 |
From f1650a0ed4fc226325e5a9772e6d04a95457f470 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <f1650a0ed4fc226325e5a9772e6d04a95457f470@dist-git>
|
|
|
d76c62 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Date: Mon, 16 Mar 2020 22:12:06 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: block: Implement readahead and timeout properties for
|
|
|
d76c62 |
'curl' driver
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Pass in the correct fields.
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 9cac141cd67d2213074fd146b58812da8fe30603)
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1804750
|
|
|
d76c62 |
Message-Id: <71cba24b72024183752fe9873d0fd5f01caf122b.1584391727.git.pkrempa@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_block.c | 2 ++
|
|
|
d76c62 |
tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args | 6 ++++--
|
|
|
d76c62 |
tests/qemuxml2argvdata/disk-network-http.xml | 2 ++
|
|
|
d76c62 |
3 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c
|
|
|
d76c62 |
index 80a8c7296d..b077e2e02f 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_block.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_block.c
|
|
|
d76c62 |
@@ -722,6 +722,8 @@ qemuBlockStorageSourceGetCURLProps(virStorageSourcePtr src,
|
|
|
d76c62 |
"S:password-secret", passwordalias,
|
|
|
d76c62 |
"T:sslverify", src->sslverify,
|
|
|
d76c62 |
"S:cookie-secret", cookiealias,
|
|
|
d76c62 |
+ "P:timeout", src->timeout,
|
|
|
d76c62 |
+ "P:readahead", src->readahead,
|
|
|
d76c62 |
NULL));
|
|
|
d76c62 |
|
|
|
d76c62 |
return ret;
|
|
|
d76c62 |
diff --git a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
index cbb69e16a9..2f2849ebdf 100644
|
|
|
d76c62 |
--- a/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
+++ b/tests/qemuxml2argvdata/disk-network-http.x86_64-latest.args
|
|
|
d76c62 |
@@ -28,13 +28,15 @@ file=/tmp/lib/domain--1-QEMUGuest1/master-key.aes \
|
|
|
d76c62 |
-boot strict=on \
|
|
|
d76c62 |
-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
|
|
|
d76c62 |
-blockdev '{"driver":"http","url":"http://example.org:80/test.img",\
|
|
|
d76c62 |
-"node-name":"libvirt-4-storage","auto-read-only":true,"discard":"unmap"}' \
|
|
|
d76c62 |
+"timeout":1234,"node-name":"libvirt-4-storage","auto-read-only":true,\
|
|
|
d76c62 |
+"discard":"unmap"}' \
|
|
|
d76c62 |
-blockdev '{"node-name":"libvirt-4-format","read-only":false,"driver":"raw",\
|
|
|
d76c62 |
"file":"libvirt-4-storage"}' \
|
|
|
d76c62 |
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x2,drive=libvirt-4-format,\
|
|
|
d76c62 |
id=virtio-disk0,bootindex=1 \
|
|
|
d76c62 |
-blockdev '{"driver":"https","url":"https://example.org:443/test2.img",\
|
|
|
d76c62 |
-"node-name":"libvirt-3-storage","auto-read-only":true,"discard":"unmap"}' \
|
|
|
d76c62 |
+"readahead":1024,"node-name":"libvirt-3-storage","auto-read-only":true,\
|
|
|
d76c62 |
+"discard":"unmap"}' \
|
|
|
d76c62 |
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"driver":"raw",\
|
|
|
d76c62 |
"file":"libvirt-3-storage"}' \
|
|
|
d76c62 |
-device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x3,drive=libvirt-3-format,\
|
|
|
d76c62 |
diff --git a/tests/qemuxml2argvdata/disk-network-http.xml b/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
index 6acf75cf65..20024c732e 100644
|
|
|
d76c62 |
--- a/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
+++ b/tests/qemuxml2argvdata/disk-network-http.xml
|
|
|
d76c62 |
@@ -17,6 +17,7 @@
|
|
|
d76c62 |
<driver name='qemu' type='raw'/>
|
|
|
d76c62 |
<source protocol='http' name='test.img'>
|
|
|
d76c62 |
<host name='example.org'/>
|
|
|
d76c62 |
+ <timeout seconds='1234'/>
|
|
|
d76c62 |
</source>
|
|
|
d76c62 |
<target dev='vda' bus='virtio'/>
|
|
|
d76c62 |
</disk>
|
|
|
d76c62 |
@@ -24,6 +25,7 @@
|
|
|
d76c62 |
<driver name='qemu' type='raw'/>
|
|
|
d76c62 |
<source protocol='https' name='test2.img'>
|
|
|
d76c62 |
<host name='example.org'/>
|
|
|
d76c62 |
+ <readahead size='1024'/>
|
|
|
d76c62 |
</source>
|
|
|
d76c62 |
<target dev='vdb' bus='virtio'/>
|
|
|
d76c62 |
</disk>
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|