Re: [libvirt] [PATCH 09/13] qemu: snapshot: Move all cleanup of snapshot disk data to qemuDomainSnapshotDiskDataFree

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:31PM +0200, Peter Krempa wrote: qemuDomainSnapshotDiskDataFree also removes the resources associated with the disk data. Move the unlinking of the just-created file so that we can unify the cleanup paths. Pre-exisiting since commit cbb4d229, but touching the disk

Re: [libvirt] [PATCH 10/13] qemu: snapshot: Don't overload 'ret' in qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:32PM +0200, Peter Krempa wrote: Introduce 'rc' for collecting state from monitor commands so that we can initialize 'ret' to -1. This also fixes few cases which could return 0 from the fucntion despite an error condition. function Signed-off-by: Peter Krempa

Re: [libvirt] [PATCH 12/13] qemu: snapshot: Return early if there's nothing to snapshot

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:34PM +0200, Peter Krempa wrote: Skip actual snapshot creation code if we have 0 disks to snapshot. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP

Re: [libvirt] [PATCH 11/13] qemu: snapshot: Unify 'cleanup' and 'error' in qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:33PM +0200, Peter Krempa wrote: All cases taking the 'cleanup' path can take the original 'error' path. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 13/13] qemu: snapshot: Remove unnecessary 'do_transaction' logic in qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:35PM +0200, Peter Krempa wrote: Now that we never get to the actual snapshot code if there's nothing to do we can remove the variable and surrounding logic. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 31 +-- 1 file changed,

Re: [libvirt] [PATCH 06/13] qemu: snapshot: Always save status and config after qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:28PM +0200, Peter Krempa wrote: The error path is unlikely thus saving the status XML even if we didn't modify it does not add much burden. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

Re: [libvirt] [PATCH 07/13] qemu: snapshot: Always save config XML after qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:29PM +0200, Peter Krempa wrote: If there's a offline config definition save it unconditionally even if *an offline it was not modified. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 12 1 file changed, 4 insertions(+), 8 deletions(-)

Re: [libvirt] [PATCH 04/13] qemu: Use VIR_AUTO* in qemuDomainSnapshotCreateActiveExternal

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:26PM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH 05/13] qemu: snapshot: Remove unused cleanup section in qemuDomainSnapshotCreateSingleDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:27PM +0200, Peter Krempa wrote: After getting rid of pre-transaction qemu support the cleanup section is unused. Yay for progress. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-)

Re: [libvirt] [PATCH 08/13] qemu: snapshot: Densely pack data in qemuDomainSnapshotDiskDataCollect

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:30PM +0200, Peter Krempa wrote: The function skips disks which are not selected for snapshot. Rather than creating a sparse array and check whether the given field is filled compress the entries. Note that this does not allocate a smaller array, but the memory

Re: [libvirt] [PATCH 03/13] qemu: Use virErrorPreserveLast in qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:25PM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH 02/13] qemu: Use VIR_AUTOPTR in qemuDomainSnapshotCreateDiskActive

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:24PM +0200, Peter Krempa wrote: Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description: PGP signature -- libvir-list mailing list

Re: [libvirt] [PATCH 01/13] qemu: snapshot: Pass 'cfg' to external snapshot functions

2019-06-08 Thread Ján Tomko
On Wed, Jun 05, 2019 at 05:28:23PM +0200, Peter Krempa wrote: The caller has it so there's no point in getting it again. Unless the point is to reduce argument count. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-)

[libvirt] [PATCH] test_driver: implement virNetworkGetDHCPLeases

2019-06-08 Thread Ilias Stamatis
Return infinite time DHCP leases for fixed IPV4 addresses. Signed-off-by: Ilias Stamatis --- src/test/test_driver.c | 118 + 1 file changed, 118 insertions(+) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1aa79ce898..b7f8f6ecf2