[PATCH v4 0/2] A couple nbdkit-related fixes

Jonathon Jongsma (2): qemu: Fix bug in nbdkit-backed backing chains tests: Remove readahead and timeout from ssh tests src/qemu/qemu_nbdkit.c | 2 +- tests/qemuxml2argvdata/disk-network-ssh-key.xml | 4 ---- tests/qemuxml2argvdata/disk-network-ssh-password.xml | 2 -- tests/qemuxml2argvdata/disk-network-ssh.xml | 2 -- 4 files changed, 1 insertion(+), 9 deletions(-) -- 2.43.0

When trying to start nbdkit-backed disks in backing chains, we were accidentally always checking the private data of the top of the chain instead of using the loop variable. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- src/qemu/qemu_nbdkit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c index 85e61be44c..0ff07c45fc 100644 --- a/src/qemu/qemu_nbdkit.c +++ b/src/qemu/qemu_nbdkit.c @@ -901,7 +901,7 @@ qemuNbdkitStartStorageSource(virQEMUDriver *driver, virStorageSource *backing; for (backing = src; backing != NULL; backing = backing->backingStore) { - qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(src); + qemuDomainStorageSourcePrivate *priv = QEMU_DOMAIN_STORAGE_SOURCE_PRIVATE(backing); if (priv && priv->nbdkitProcess && qemuNbdkitProcessStart(priv->nbdkitProcess, vm, driver) < 0) -- 2.43.0

These values are currently unsupported for ssh disks, and in fact aren't even parsed for ssh disks. So while this didn't result in any test errors, we can remove them from the test input files. Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com> --- tests/qemuxml2argvdata/disk-network-ssh-key.xml | 4 ---- tests/qemuxml2argvdata/disk-network-ssh-password.xml | 2 -- tests/qemuxml2argvdata/disk-network-ssh.xml | 2 -- 3 files changed, 8 deletions(-) diff --git a/tests/qemuxml2argvdata/disk-network-ssh-key.xml b/tests/qemuxml2argvdata/disk-network-ssh-key.xml index 6328a9b7ef..1277a9b3cf 100644 --- a/tests/qemuxml2argvdata/disk-network-ssh-key.xml +++ b/tests/qemuxml2argvdata/disk-network-ssh-key.xml @@ -17,8 +17,6 @@ <driver name='qemu' type='raw'/> <source protocol='ssh' name='test1.img'> <host name='example.org' port='2222'/> - <timeout seconds='1234'/> - <readahead size='1024'/> <identity username='myuser' agentsock='/path/to/agent/socket'/> <knownHosts path="/path/to/ssh_known_hosts1"/> </source> @@ -28,8 +26,6 @@ <driver name='qemu' type='raw'/> <source protocol='ssh' name='test2.img'> <host name='example.org' port='2222'/> - <timeout seconds='1234'/> - <readahead size='1024'/> <identity username='myuser2' keyfile='/path/to/id_rsa'/> <knownHosts path="/path/to/ssh_known_hosts2"/> </source> diff --git a/tests/qemuxml2argvdata/disk-network-ssh-password.xml b/tests/qemuxml2argvdata/disk-network-ssh-password.xml index bdb4cf6e35..1ba0cb094c 100644 --- a/tests/qemuxml2argvdata/disk-network-ssh-password.xml +++ b/tests/qemuxml2argvdata/disk-network-ssh-password.xml @@ -17,8 +17,6 @@ <driver name='qemu' type='raw'/> <source protocol='ssh' name='test2.img'> <host name='example.org' port='2222'/> - <timeout seconds='1234'/> - <readahead size='1024'/> <auth username='testuser'> <secret type='iscsi' usage='mycluster_myname'/> </auth> diff --git a/tests/qemuxml2argvdata/disk-network-ssh.xml b/tests/qemuxml2argvdata/disk-network-ssh.xml index a3aeca0c99..f5956fcc6f 100644 --- a/tests/qemuxml2argvdata/disk-network-ssh.xml +++ b/tests/qemuxml2argvdata/disk-network-ssh.xml @@ -17,8 +17,6 @@ <driver name='qemu' type='raw'/> <source protocol='ssh' name='test.img'> <host name='example.org' port='2222'/> - <timeout seconds='1234'/> - <readahead size='1024'/> <knownHosts path="/path/to/ssh_known_hosts"/> </source> <target dev='vda' bus='virtio'/> -- 2.43.0

On 1/23/24 2:47 PM, Peter Krempa wrote:
On Tue, Jan 23, 2024 at 13:00:35 -0600, Jonathon Jongsma wrote:
From subject: v4?
Jonathon Jongsma (2): qemu: Fix bug in nbdkit-backed backing chains tests: Remove readahead and timeout from ssh tests
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Oops re v4. I think that happened from calling git publish on my master branch rather than a different branch. Apparently I've submitted patches from master before and git publish things it should bump the revision for this series... Also, I'm going to self-nack and send a v2 because I just noticed that the same error in iteration occurs in the StopStorageSource() function.
participants (2)
-
Jonathon Jongsma
-
Peter Krempa