Re: [libvirt] [PATCH] virsh migrate: Properly check for --parallel-connections

2019-07-19 Thread Michal Privoznik
On 7/19/19 4:05 PM, Jiri Denemark wrote: Ever since --parallel-connections option for virsh migrate was introduced we did not properly check the return value of vshCommandOptInt. We would set VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS parameter even if vshCommandOptInt returned 0 (which means

[libvirt] [PATCH] virsh migrate: Properly check for --parallel-connections

2019-07-19 Thread Jiri Denemark
Ever since --parallel-connections option for virsh migrate was introduced we did not properly check the return value of vshCommandOptInt. We would set VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS parameter even if vshCommandOptInt returned 0 (which means --parallel-connections was not specified) when

Re: [libvirt] [PATCH] util: change the return value of virCgroupRemove if failed

2019-07-19 Thread Michal Privoznik
On 7/19/19 5:19 AM, Wang Yechao wrote: virCgroupRemove return -1 when removing cgroup failed. But there are retry code to remove cgroup in QemuProcessStop: retry: if ((ret = qemuRemoveCgroup(vm)) < 0) { if (ret == -EBUSY && (retries++ < 5)) { usleep(200*1000);

Re: [libvirt] [PATCH 0/3] qemu: Fix handling of block job data in event handlers (blockdev-add saga fixes)

2019-07-19 Thread Ján Tomko
On Thu, Jul 18, 2019 at 06:22:05PM +0200, Peter Krempa wrote: Some of the refactors which allowed carrying more data with blockjobs created a race condition when a too-quick job would actually delete the data. This is a problem for legacy block jobs only. Peter Krempa (3): qemu: process: Don't

Re: [libvirt] [RFC PATCH 0/6] Split domain_conf.h

2019-07-19 Thread Daniel P . Berrangé
On Fri, Jul 19, 2019 at 02:15:42PM +0200, Ján Tomko wrote: > Currently, domain_conf.{c,h} is a giant pile of functions somewhat > related to the domain definition. Try to change that by splitting out > the type declarations, XML parsing and XML formatting from the header > file. Refactoring this

Re: [libvirt] [PATCH v1 3/3] virhostdev: remove virHostdevReattachPCIDevice

2019-07-19 Thread Daniel Henrique Barboza
On 7/19/19 8:52 AM, Michal Privoznik wrote: On 7/18/19 10:10 PM, Daniel Henrique Barboza wrote: We have 3 pieces of code that do slightly the same thing, but it varies depending on where it is called: - virPCIDeviceReattach(). This is where the actual re-attach work happens; -

Re: [libvirt] [PATCH v1 2/3] virhostdev: introduce virHostdevReattachAllPCIDevices

2019-07-19 Thread Daniel Henrique Barboza
On 7/19/19 8:52 AM, Michal Privoznik wrote: On 7/18/19 10:10 PM, Daniel Henrique Barboza wrote: There are two places in virhostdev that executes a re-attach operation in all pci devices of a virPCIDeviceListPtr array: virHostdevPreparePCIDevices and virHostdevReAttachPCIDevices. The

[libvirt] [PATCH 5/6] conf: introduce domain_format.h

2019-07-19 Thread Ján Tomko
Move functions related to domain XML formatting here. Signed-off-by: Ján Tomko --- src/conf/Makefile.inc.am | 1 + src/conf/domain_conf.h | 59 +- src/conf/domain_format.h | 89 3 files changed, 91 insertions(+), 58

[libvirt] [PATCH 4/6] conf: introduce domain_parse.h

2019-07-19 Thread Ján Tomko
Move domain and device XML parsing functions as well as validation and ABI stability checking. Signed-off-by: Ján Tomko --- src/conf/Makefile.inc.am | 1 + src/conf/domain_conf.h | 295 +-- src/conf/domain_parse.h | 321

[libvirt] [PATCH 1/6] conf: move virNetworkPortDefPtr declaration to virconftypes.h

2019-07-19 Thread Ján Tomko
We have a file specifically for preventing circular inclusion. Move the virNetworkPortDefPtr typedef there for use by domain_conf.h. Signed-off-by: Ján Tomko --- src/conf/domain_conf.h | 5 - src/conf/virconftypes.h | 3 +++ src/conf/virnetworkportdef.h | 4 +--- 3 files changed,

[libvirt] [PATCH 6/6] maint: include virdomaintypes.h instead of domain_conf.h

2019-07-19 Thread Ján Tomko
Most of the consumers only care about the domain types and do not need to parse/format XML. Include the smaller, more specific header if possible. Signed-off-by: Ján Tomko --- src/access/viraccessdriver.h | 2 +- src/access/viraccessmanager.h | 2 +-

[libvirt] [PATCH 2/6] virsh: clean up includes

2019-07-19 Thread Ján Tomko
We don't need domain_conf or libvirt-{qemu,lxc} in these generic files. Signed-off-by: Ján Tomko --- tools/virsh.c | 3 --- tools/vsh.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index b41304a888..c758e38cbd 100644 --- a/tools/virsh.c +++

[libvirt] [RFC PATCH 0/6] Split domain_conf.h

2019-07-19 Thread Ján Tomko
Currently, domain_conf.{c,h} is a giant pile of functions somewhat related to the domain definition. Try to change that by splitting out the type declarations, XML parsing and XML formatting from the header file. Ján Tomko (6): conf: move virNetworkPortDefPtr declaration to virconftypes.h

Re: [libvirt] [PATCH v1 1/3] virhostdev: introduce virHostdevResetAllPCIDevices

2019-07-19 Thread Michal Privoznik
On 7/18/19 10:10 PM, Daniel Henrique Barboza wrote: This code that executes virPCIDeviceReset in all virPCIDevicePtr objects of a given virPCIDeviceListPtr list is replicated twice in the code. Putting it in a helper function helps with readability. Signed-off-by: Daniel Henrique Barboza ---

Re: [libvirt] [PATCH v1 2/3] virhostdev: introduce virHostdevReattachAllPCIDevices

2019-07-19 Thread Michal Privoznik
On 7/18/19 10:10 PM, Daniel Henrique Barboza wrote: There are two places in virhostdev that executes a re-attach operation in all pci devices of a virPCIDeviceListPtr array: virHostdevPreparePCIDevices and virHostdevReAttachPCIDevices. The difference is that the code inside

Re: [libvirt] [PATCH v1 3/3] virhostdev: remove virHostdevReattachPCIDevice

2019-07-19 Thread Michal Privoznik
On 7/18/19 10:10 PM, Daniel Henrique Barboza wrote: We have 3 pieces of code that do slightly the same thing, but it varies depending on where it is called: - virPCIDeviceReattach(). This is where the actual re-attach work happens; - virHostdevReattachPCIDevice(). This is a static function

Re: [libvirt] [PATCH] news: mention new bochs display device

2019-07-19 Thread Michal Privoznik
On 7/18/19 9:16 PM, Jonathon Jongsma wrote: Signed-off-by: Jonathon Jongsma --- docs/news.xml | 9 + 1 file changed, 9 insertions(+) ACKed and pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Erik Skultety
On Fri, Jul 19, 2019 at 10:11:36AM +0100, Daniel P. Berrangé wrote: > On Fri, Jul 19, 2019 at 11:01:59AM +0200, Erik Skultety wrote: > > On Fri, Jul 19, 2019 at 09:34:03AM +0100, Daniel P. Berrangé wrote: > > > On Fri, Jul 19, 2019 at 08:44:59AM +0200, Erik Skultety wrote: > > > > On Fri, Jul 19,

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Daniel P . Berrangé
On Fri, Jul 19, 2019 at 11:01:59AM +0200, Erik Skultety wrote: > On Fri, Jul 19, 2019 at 09:34:03AM +0100, Daniel P. Berrangé wrote: > > On Fri, Jul 19, 2019 at 08:44:59AM +0200, Erik Skultety wrote: > > > On Fri, Jul 19, 2019 at 08:39:35AM +0200, Peter Krempa wrote: > > > > On Fri, Jul 19, 2019

Re: [libvirt] [PATCH] virfile: adds quobyte as a shared fs

2019-07-19 Thread Michal Privoznik
On 7/10/19 4:21 PM, Silvan Kaiser wrote: Am Sa., 15. Juni 2019 um 14:59 Uhr schrieb Michal Prívozník < mpriv...@redhat.com>: On 5/28/19 2:55 PM, Silvan Kaiser wrote: Adds detection of a Quobyte shared file system for live migration. Signed-off-by: Silvan Kaiser --- src/util/virfile.c

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Erik Skultety
On Fri, Jul 19, 2019 at 09:34:03AM +0100, Daniel P. Berrangé wrote: > On Fri, Jul 19, 2019 at 08:44:59AM +0200, Erik Skultety wrote: > > On Fri, Jul 19, 2019 at 08:39:35AM +0200, Peter Krempa wrote: > > > On Fri, Jul 19, 2019 at 08:30:34 +0200, Erik Skultety wrote: > > > > virPCIGetSysfsFile is

[libvirt] [PATCH 05/14] tools: Separate storage volume related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to storage volumes (e.g. they complete various storage volume aspects) into virsh-completer-volume.c Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

[libvirt] [PATCH 00/14] Split and enhancement of virsh completer

2019-07-19 Thread Michal Privoznik
Having all completers inside one file is not good. Let's split it the same way we have other files split (e.g. src/libvirt-*.c) and then add one completer to demonstrate where new completers should be added. Michal Prívozník (14): tools: s/Nodedev/NodeDevice/ tools: Expose

[libvirt] [PATCH 07/14] tools: Separate network related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to networks (e.g. they complete various network aspects) into virsh-completer-network.c Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

[libvirt] [PATCH 01/14] tools: s/Nodedev/NodeDevice/

2019-07-19 Thread Michal Privoznik
The proper name is [vir|virsh]NodeDevice* and not Nodedev. Fortunately, there are only handful of offenders. Signed-off-by: Michal Privoznik --- tools/virsh-completer.c | 14 +++--- tools/virsh-completer.h | 12 ++-- tools/virsh-nodedev.c | 16

[libvirt] [PATCH 14/14] virsh: Introduce virshPoolTypeCompleter

2019-07-19 Thread Michal Privoznik
This completer can be used to complete pool types. Signed-off-by: Michal Privoznik --- tools/virsh-completer-pool.c | 27 +++ tools/virsh-completer-pool.h | 4 tools/virsh-pool.c | 1 + 3 files changed, 32 insertions(+) diff --git

[libvirt] [PATCH 10/14] tools: Separate secret related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to secret (e.g. they complete various secret aspects) into virsh-completer-secret.c Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

[libvirt] [PATCH 04/14] tools: Separate storage pool related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to storage pools (e.g. they complete various storage pool aspects) into virsh-completer-pool.c. Signed-off-by: Michal Privoznik --- tools/Makefile.am| 1 +

[libvirt] [PATCH 02/14] tools: Expose virshCommaStringListComplete()

2019-07-19 Thread Michal Privoznik
In next commits the virsh-completer.c is going to be split into smaller files. Expose virshCommaStringListComplete() so that it can still be used from those new files. Signed-off-by: Michal Privoznik --- tools/virsh-completer.c | 2 +- tools/virsh-completer.h | 3 +++ 2 files changed, 4

[libvirt] [PATCH 09/14] tools: Separate nwfilter related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to nwfilter (e.g. they complete various nwfilter aspects) into virsh-completer-nwfilter.c Signed-off-by: Michal Privoznik --- tools/Makefile.am| 1 +

[libvirt] [PATCH 13/14] virsh-completer: Drop needless #include

2019-07-19 Thread Michal Privoznik
Now that there is no code in virsh-completer.c it doesn't make much sense to keep those #include-s around. Delete them. Signed-off-by: Michal Privoznik --- tools/virsh-completer.c | 13 - tools/virsh-completer.h | 2 -- 2 files changed, 15 deletions(-) diff --git

[libvirt] [PATCH 11/14] tools: Separate snapshot related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to snapshot (e.g. they complete various snapshot aspects) into virsh-completer-snapshot.c Signed-off-by: Michal Privoznik --- tools/Makefile.am| 1 +

[libvirt] [PATCH 06/14] tools: Separate interface related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to interfaces (e.g. they complete various interface aspects) into virsh-completer-interface.c Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

[libvirt] [PATCH 12/14] tools: Separate host related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to host (e.g. they complete various host aspects) into virsh-completer-host.c Signed-off-by: Michal Privoznik --- tools/Makefile.am| 1 + tools/virsh-completer-host.c | 148

[libvirt] [PATCH 08/14] tools: Separate nodedev related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to nodedev (e.g. they complete various nodedev aspects) into virsh-completer-nodedev.c Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

[libvirt] [PATCH 03/14] tools: Separate domain related completers into a file

2019-07-19 Thread Michal Privoznik
Mixing all completers in one file does not support maintainability. Separate those completers which relate to domains (e.g. they complete various domain aspects) into virsh-completer-domain.c. Signed-off-by: Michal Privoznik --- tools/Makefile.am | 1 +

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Daniel P . Berrangé
On Fri, Jul 19, 2019 at 08:44:59AM +0200, Erik Skultety wrote: > On Fri, Jul 19, 2019 at 08:39:35AM +0200, Peter Krempa wrote: > > On Fri, Jul 19, 2019 at 08:30:34 +0200, Erik Skultety wrote: > > > virPCIGetSysfsFile is conditionally compiled only on Linux platforms. > > > > > > Signed-off-by:

Re: [libvirt] [PATCH] virpci: Drop duplicate function

2019-07-19 Thread Erik Skultety
On Fri, Jul 19, 2019 at 10:09:22AM +0200, Michal Privoznik wrote: > We have two functions: virPCIDeviceAddressIsEqual() defined only > on Linux and virPCIDeviceAddressEqual() defined everywhere. And > both of them do the same. Drop the former in favour of the > latter. > > Signed-off-by: Michal

[libvirt] [PATCH] virpci: Drop duplicate function

2019-07-19 Thread Michal Privoznik
We have two functions: virPCIDeviceAddressIsEqual() defined only on Linux and virPCIDeviceAddressEqual() defined everywhere. And both of them do the same. Drop the former in favour of the latter. Signed-off-by: Michal Privoznik --- src/util/virpci.c | 15 +-- 1 file changed, 1

[libvirt] [PATCH] qemu: blockjob: Adjust ATTRIBUTE_NONNULL statements for qemuBlockJobDiskNew

2019-07-19 Thread Peter Krempa
Commit 5ff46aaa7f added a new parameter but neglected to fix the NONNULL declarations. Reported-by: Julio Faracco Signed-off-by: Peter Krempa --- src/qemu/qemu_blockjob.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Pushed under the trivial rule. diff --git

Re: [libvirt] [PATCH 06/25] qemu: blockjob: Register new and running blockjobs in the global table

2019-07-19 Thread Peter Krempa
On Fri, Jul 19, 2019 at 00:18:31 -0300, Julio Faracco wrote: > Hi guys, > > Em sex, 12 de jul de 2019 às 13:06, Peter Krempa > escreveu: > > > > Add the job structure to the table when instantiating a new job and > > remove it when it terminates/fails. > > > > Signed-off-by: Peter Krempa > >

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Erik Skultety
On Fri, Jul 19, 2019 at 08:39:35AM +0200, Peter Krempa wrote: > On Fri, Jul 19, 2019 at 08:30:34 +0200, Erik Skultety wrote: > > virPCIGetSysfsFile is conditionally compiled only on Linux platforms. > > > > Signed-off-by: Erik Skultety > > --- > > > > Pushed under the build breaker rule. > > > >

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Peter Krempa
On Fri, Jul 19, 2019 at 08:39:35 +0200, Peter Krempa wrote: > On Fri, Jul 19, 2019 at 08:30:34 +0200, Erik Skultety wrote: > > virPCIGetSysfsFile is conditionally compiled only on Linux platforms. > > > > Signed-off-by: Erik Skultety > > --- > > > > Pushed under the build breaker rule. > > > >

Re: [libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Peter Krempa
On Fri, Jul 19, 2019 at 08:30:34 +0200, Erik Skultety wrote: > virPCIGetSysfsFile is conditionally compiled only on Linux platforms. > > Signed-off-by: Erik Skultety > --- > > Pushed under the build breaker rule. > > src/util/virpci.c | 8 > 1 file changed, 8 insertions(+) > > diff

[libvirt] [PATCH] util: Fix broken MinGW builds caused by commit 9bc01ad8

2019-07-19 Thread Erik Skultety
virPCIGetSysfsFile is conditionally compiled only on Linux platforms. Signed-off-by: Erik Skultety --- Pushed under the build breaker rule. src/util/virpci.c | 8 1 file changed, 8 insertions(+) diff --git a/src/util/virpci.c b/src/util/virpci.c index 75e8daadd5..ae3a0fa886 100644