Re: [libvirt] [PATCH 0/8 v5] Summary on block IO throttle

2011-11-23 Thread Stefan Hajnoczi
On Wed, Nov 23, 2011 at 4:59 AM, Zhi Yong Wu wrote: > On Wed, Nov 23, 2011 at 12:27 PM, Eric Blake wrote: >> On 11/15/2011 02:02 AM, Lei Li wrote: >>> Changes since V3 >>>  - Use virTypedParameterPtr instead of specific struct in libvirt pulic API. >>>  - Relevant changes to remote driver, qemu d

Re: [libvirt] [PATCH v4] virsh: Increase device-detach intelligence

2011-11-23 Thread Michal Privoznik
On 22.11.2011 21:29, Eric Blake wrote: > On 11/22/2011 03:26 AM, Michal Privoznik wrote: >> From: Michal Prívozník >> >> Up to now users have to give a full XML description on input when >> device-detaching. If they omitted something it lead to unclear >> error messages (like generated MAC wasn't

[libvirt] [PATCH] nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable

2011-11-23 Thread Michal Privoznik
Latest nwfilter patch ad6c67cf introduced uninitialized return value. This was spotted by 4.6.2 gcc. --- src/nwfilter/nwfilter_learnipaddr.c | 12 +++- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_learnipaddr.

Re: [libvirt] [PATCH v3 2/2] Make the API public

2011-11-23 Thread Srivatsa S. Bhat
On 11/22/2011 11:56 PM, Eric Blake wrote: > On 11/09/2011 05:05 AM, Srivatsa S. Bhat wrote: >> Define the required interfaces to export the API. >> >> Signed-off-by: Srivatsa S. Bhat >> --- >> >> include/libvirt/libvirt.h.in |4 >> src/driver.h |5 >> src/libvirt

Re: [libvirt] [PATCH] nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable

2011-11-23 Thread Jiri Denemark
On Wed, Nov 23, 2011 at 11:13:47 +0100, Michal Privoznik wrote: > Latest nwfilter patch ad6c67cf introduced uninitialized return > value. This was spotted by 4.6.2 gcc. > --- > src/nwfilter/nwfilter_learnipaddr.c | 12 +++- > 1 files changed, 7 insertions(+), 5 deletions(-) > > diff --g

[libvirt] [PATCH] nwfilter: remove virConnectPtr from internal API calls

2011-11-23 Thread Stefan Berger
Remove the virConnectPtr from the nwfilter's internal API calls as far as possible. --- src/conf/nwfilter_conf.h | 18 ++- src/nwfilter/nwfilter_ebiptables_driver.c | 34 -- src/nwfilter/nwfilter_gentech_driver.c| 72 ++ src/n

Re: [libvirt] [libvirt-gconfig PATCHv2 13/32] Add gobject boilerplate for GVirConfigOs

2011-11-23 Thread Christophe Fergeau
On Tue, Nov 22, 2011 at 01:01:17PM +, Daniel P. Berrange wrote: > On Mon, Nov 21, 2011 at 07:04:10PM +0100, Christophe Fergeau wrote: > > +static void gvir_config_os_init(GVirConfigOs *os) > > +{ > > +GVirConfigOsPrivate *priv; > > + > > +DEBUG("Init GVirConfigOs=%p", os); > > + > > +

Re: [libvirt] [libvirt-gconfig PATCHv2 25/32] GVirConfigInterface derives from GVirConfigDevice

2011-11-23 Thread Christophe Fergeau
On Tue, Nov 22, 2011 at 01:14:41PM +, Daniel P. Berrange wrote: > On Mon, Nov 21, 2011 at 07:04:22PM +0100, Christophe Fergeau wrote: > > This base class is mainly useful as a generic type when we manipulate > > list of devices regardless of their actual type. > > --- > > libvirt-gconfig/libvi

[libvirt] [PATCH] Fix uninitialized variable in NWfilter IP learning code

2011-11-23 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Pushed as a build-breaker fix * src/nwfilter/nwfilter_learnipaddr.c: Initialize ret variable --- src/nwfilter/nwfilter_learnipaddr.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/nwfilter/nwfilter_learnipaddr.c b/src/nwfilter/nwfilter_l

[libvirt] [PATCH v2] nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable

2011-11-23 Thread Stefan Berger
Thanks for trying to fix this. This one tries to address Jiri's concern about the return value from virNWFilterHashTablePut with a not to fix it in the future. Latest nwfilter patch ad6c67cf introduced uninitialized return value. This was spotted by 4.6.2 gcc. --- src/nwfilter/nwfilter_learnipad

[libvirt] [PATCH] nwfilter: Fix return value of virNWFilterHashTablePut

2011-11-23 Thread Michal Privoznik
In libvirt it is common to return value <0 on error not vice versa. --- src/conf/nwfilter_params.c | 16 src/nwfilter/nwfilter_gentech_driver.c |4 ++-- src/nwfilter/nwfilter_learnipaddr.c|2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --g

Re: [libvirt] [PATCH v2] nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable

2011-11-23 Thread Eric Blake
On 11/23/2011 05:15 AM, Stefan Berger wrote: > Thanks for trying to fix this. This one tries to address Jiri's concern > about the return value from virNWFilterHashTablePut with a not to fix it > in the future. > > Latest nwfilter patch ad6c67cf introduced uninitialized return > value. This was sp

Re: [libvirt] [PATCH] Fix uninitialized variable in NWfilter IP learning code

2011-11-23 Thread Matthias Bolte
2011/11/23 Daniel P. Berrange : > From: "Daniel P. Berrange" > > Pushed as a build-breaker fix > > * src/nwfilter/nwfilter_learnipaddr.c: Initialize ret variable > --- >  src/nwfilter/nwfilter_learnipaddr.c |    1 + >  1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/src/nwfilter/

Re: [libvirt] [PATCH v2] nwfilter: Initialize virNWFilterAddIpAddrForIfname return variable

2011-11-23 Thread Stefan Berger
On 11/23/2011 07:31 AM, Eric Blake wrote: On 11/23/2011 05:15 AM, Stefan Berger wrote: Thanks for trying to fix this. This one tries to address Jiri's concern about the return value from virNWFilterHashTablePut with a not to fix it in the future. Latest nwfilter patch ad6c67cf introduced uninit

Re: [libvirt] [PATCH] Fix uninitialized variable in NWfilter IP learning code

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 01:41:15PM +0100, Matthias Bolte wrote: > 2011/11/23 Daniel P. Berrange : > > From: "Daniel P. Berrange" > > > > Pushed as a build-breaker fix > > > > * src/nwfilter/nwfilter_learnipaddr.c: Initialize ret variable > > --- > >  src/nwfilter/nwfilter_learnipaddr.c |    1 + >

Re: [libvirt] [libvirt-gconfig PATCHv2 08/32] Add gvir_config_domain_set_clock

2011-11-23 Thread Christophe Fergeau
On Tue, Nov 22, 2011 at 01:03:37PM +, Daniel P. Berrange wrote: > On Tue, Nov 22, 2011 at 12:56:02PM +, Daniel P. Berrange wrote: > > We should start a LIBVIRT_GOBJECT_0.0.2 block for symbols now 0.0.1 is > > released. > > On second thought, we could just rename the existing symbol version

Re: [libvirt] [PATCH v3 2/2] Make the API public

2011-11-23 Thread Srivatsa S. Bhat
On 11/23/2011 04:10 PM, Srivatsa S. Bhat wrote: > On 11/22/2011 11:56 PM, Eric Blake wrote: >> On 11/09/2011 05:05 AM, Srivatsa S. Bhat wrote: >>> Define the required interfaces to export the API. >>> >>> Signed-off-by: Srivatsa S. Bhat >>> --- >>> >>> include/libvirt/libvirt.h.in |4 >>>

Re: [libvirt] [PATCH 2/1] API: prefer 'disk' over 'block' or 'path'

2011-11-23 Thread Eric Blake
On 11/22/2011 11:06 PM, Daniel Veillard wrote: > On Tue, Nov 22, 2011 at 05:21:44PM -0700, Eric Blake wrote: >> Given that we can now handle the target's disk shorthand, in addition >> to an absolute path to the file or block device used on the host, >> the term 'disk' fits a bit better as the para

Re: [libvirt] [PATCH] nwfilter: Fix return value of virNWFilterHashTablePut

2011-11-23 Thread Eric Blake
On 11/23/2011 05:33 AM, Michal Privoznik wrote: > In libvirt it is common to return value <0 on error not vice versa. > --- > src/conf/nwfilter_params.c | 16 > src/nwfilter/nwfilter_gentech_driver.c |4 ++-- > src/nwfilter/nwfilter_learnipaddr.c|2 +- >

Re: [libvirt] [PATCH v3 2/2] Make the API public

2011-11-23 Thread Eric Blake
On 11/23/2011 05:33 AM, Srivatsa S. Bhat wrote: >> Perhaps, I'll send a companion patch to add the hybrid-suspend discovery >> to that, and then base the next version of this patchset on that. >> > > Actually thinking about it, I don't see how that would be useful for a > libvirt managed host. The

[libvirt] [libvirt-glib PATCHv3 03/27] Add gvir_config_domain_set_clock

2011-11-23 Thread Christophe Fergeau
The implementation is likely to need to be completed later. We might want to store pointers from GVirConfigDomain to the associated GVirConfigDomainClock, from GVirConfigDomainClock to the GVirConfigDomain that contains it. Since I'm not sure yet if they will be needed, I chose to keep the implemen

[libvirt] [libvirt-glib PATCHv3 09/27] Implement gvir_config_domain_set_os

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity --- libvirt-gconfig/libvirt-gconfig-domain.c | 12 libvirt-gconfig/libvirt-gconfig-domain.h |3 +++ libvirt-gconfig/libvirt-gconfig.sym |1 + 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/lib

[libvirt] libvirt-gconfig patches

2011-11-23 Thread Christophe Fergeau
Here is the 3rd version of my libvirt-gconfig patches, I did the renaming to put all the new classes it introduces in the GVirConfigDomain namespace. GVirConfigDomainSnapshot looks a bit out of place now though... Apart from this, I fixed the other issues that were reported, and rearranged a bit th

[libvirt] [libvirt-glib PATCHv3 04/27] Use glib-mkenums to register enums with glib

2011-11-23 Thread Christophe Fergeau
We don't currently have any enum in our API, but we will need some. This commit adds the generation of libvirt-gconfig-enum-types.[ch] using glib-mkenums. These files will register the various enums that will get added to libvirt-gconfig header files with glib. -- v2: move libvirt-gconfig-enum-typ

[libvirt] [libvirt-glib PATCHv3 02/27] Add some GVirDomainConfigClock setters

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity v3: fix typo in gvir_config_domain_clock_set_variable_offset ("timezone" -> "adjustment") --- libvirt-gconfig/libvirt-gconfig-domain-clock.c | 38 libvirt-gconfig/libvirt-gconfig-domain-clock.h |5 +++

[libvirt] [libvirt-glib PATCHv3 06/27] Create clock object in domain creation test

2011-11-23 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index a719ed2..1b00036 100644 --- a/libvirt-gconfig/tests/test-domain-create.c +++ b/

[libvirt] [libvirt-glib PATCHv3 08/27] Add some GVirConfigDomainOs setters

2011-11-23 Thread Christophe Fergeau
-- v2: merged several related commits use safer g_strcmp0 for string comparison use g_return_if_fail to test function args for sanity --- libvirt-gconfig/libvirt-gconfig-domain-os.c | 142 +++ libvirt-gconfig/libvirt-gconfig-domain-os.h | 27 + libvirt-gconfi

[libvirt] [libvirt-glib PATCHv3 13/27] Add gobject boilerplate for GVirConfigDomainDisk

2011-11-23 Thread Christophe Fergeau
-- v3: rename to GVirConfigDomainDisk --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-disk.c | 81 + libvirt-gconfig/libvirt-gconfig-domain-disk.h | 68 + libvirt-gconfig/libvirt-gconfig.h

[libvirt] [libvirt-glib PATCHv3 10/27] Add test for GVirConfigDomainOs

2011-11-23 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 1b00036..6823ebc 100644 --- a/libvirt-gconfig/tests/test-domain-

[libvirt] [libvirt-glib PATCHv3 05/27] Add gvir_config_genum_get_nick helper

2011-11-23 Thread Christophe Fergeau
We will often need to convert from an enum to its string representation, add an helper for that to avoid duplicating that code. -- v2: moved before gvir_config_clock_set_offset implementation since it needs it --- libvirt-gconfig/libvirt-gconfig-domain-clock.c| 17 + libvirt

[libvirt] [libvirt-glib PATCHv3 07/27] Add gobject boilerplate for GVirConfigDomainOs

2011-11-23 Thread Christophe Fergeau
-- v3: rename from GVirConfigOs to GVirConfigDomainOs --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-os.c | 79 +++ libvirt-gconfig/libvirt-gconfig-domain-os.h | 67 +++ libvirt-gconfig/libvirt-gconfi

[libvirt] [libvirt-glib PATCHv3 11/27] Add GVirConfigDomain::vcpu

2011-11-23 Thread Christophe Fergeau
--- libvirt-gconfig/libvirt-gconfig-domain.c | 29 libvirt-gconfig/libvirt-gconfig-domain.h |3 ++ libvirt-gconfig/libvirt-gconfig.sym|2 + libvirt-gconfig/tests/test-domain-create.c |1 + 4 files changed, 35 insertions(+), 0 deletions(-) dif

[libvirt] [libvirt-glib PATCHv3 18/27] Add test for adding a disk device

2011-11-23 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 6e59f6f..38a7fb9 100644 --- a/libvirt-gconfig/tests/test-domain-

[libvirt] [libvirt-glib PATCHv3 12/27] Add gobject boilerplate for GVirConfigDomainDevice

2011-11-23 Thread Christophe Fergeau
This is an abstract type which will be used as a base class for all objects stored in the section of a domain. -- v3: rename to GVirConfigDomainDevice --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-device.c | 61 + libvi

[libvirt] [libvirt-glib PATCHv3 19/27] Add GObject boilerplate for GVirConfigDomainInterface

2011-11-23 Thread Christophe Fergeau
This base class is mainly useful as a generic type when we manipulate list of interfaces regardless of their actual type. -- v3: rename to GVirConfigDomainInterface since GVirConfigInterface has a different purpose --- libvirt-gconfig/Makefile.am|2 + libvirt-gconf

[libvirt] [libvirt-glib PATCHv3 16/27] Add gvir_config_object_add_child

2011-11-23 Thread Christophe Fergeau
It's similar to gvir_config_object_replace_child except that if the current node already has a child with the correct name, it returns the existing child instead of replacing it. -- v2: instead of adding an argument to gvir_config_object_new_child, split the function in 2 separate ones, gvir_confi

[libvirt] [libvirt-glib PATCHv3 14/27] Add various GVirConfigDomainDisk setters

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity --- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 50 + libvirt-gconfig/libvirt-gconfig-domain-disk.h | 25 libvirt-gconfig/libvirt-gconfig.sym |6 +++ 3 files changed, 81 insertio

[libvirt] [libvirt-glib PATCHv3 25/27] Add basic GVirConfigDomainGraphicsSpice

2011-11-23 Thread Christophe Fergeau
Only the (non-TLS) port can be set on it -- v2: rename to GVirConfigDeviceGraphicsSpice fix node creation (missing "type" attribute) derive GVirConfigDeviceGraphicsSpice from GVirConfigDeviceGraphics use g_return_if_fail to test function args for sanity v3: rename to GVirConfigDomainGr

[libvirt] [libvirt-glib PATCHv3 01/27] Add gobject boilerplate for GVirConfigDomain{Clock, Timer}

2011-11-23 Thread Christophe Fergeau
-- v3: rename from GVirConfig* to GVirConfigDomain* --- libvirt-gconfig/Makefile.am|4 + libvirt-gconfig/libvirt-gconfig-domain-clock.c | 81 libvirt-gconfig/libvirt-gconfig-domain-clock.h | 68 libvirt-gconfig/libvirt-gconf

[libvirt] [libvirt-glib PATCHv3 24/27] Add GObject boilerplate for GVirConfigDomainGraphics

2011-11-23 Thread Christophe Fergeau
This is an abstract type which will be used as a base class for the various type of devices (spice, vnc, ...) -- v3: rename to GVirConfigDomainGraphics --- libvirt-gconfig/Makefile.am |2 + libvirt-gconfig/libvirt-gconfig-domain-graphics.c | 61 l

[libvirt] [libvirt-glib PATCHv3 15/27] Add gvir_config_domain_set_devices

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity --- libvirt-gconfig/libvirt-gconfig-domain.c | 23 +++ libvirt-gconfig/libvirt-gconfig-domain.h |2 ++ libvirt-gconfig/libvirt-gconfig.sym |3 ++- 3 files changed, 27 insertions(+), 1 deletions(-) diff

[libvirt] [libvirt-glib PATCHv3 20/27] Add GVirConfigDomainInterfaceNetwork

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity v3: rename to GVirConfigDomainInterfaceNetwork --- libvirt-gconfig/Makefile.am|2 + .../libvirt-gconfig-domain-interface-network.c | 92 .../libvirt-gconfig-domain-interface-network.

[libvirt] [libvirt-glib PATCHv3 27/27] Don't memset GObject private data to 0

2011-11-23 Thread Christophe Fergeau
The GObject private data allocated with g_type_class_add_private will be automatically zero'ed when the GObject is created so we don't need to memset it to 0. --- libvirt-gconfig/libvirt-gconfig-capabilities.c |6 +- libvirt-gconfig/libvirt-gconfig-domain-clock.c |6 +- lib

[libvirt] [libvirt-glib PATCHv3 23/27] Add GVirConfigDomainInput

2011-11-23 Thread Christophe Fergeau
-- v2: use enum for input bus type use g_return_if_fail to test function args for sanity v3: rename to GVirConfigDomainInput --- libvirt-gconfig/Makefile.am|2 + libvirt-gconfig/libvirt-gconfig-domain-input.c | 113 libvirt-gconfig/libvirt-gcon

[libvirt] [libvirt-glib PATCHv3 21/27] Add gvir_config_domain_interface_network_set_source

2011-11-23 Thread Christophe Fergeau
--- .../libvirt-gconfig-domain-interface-network.c | 13 + .../libvirt-gconfig-domain-interface-network.h |3 +++ libvirt-gconfig/libvirt-gconfig.sym|1 + 3 files changed, 17 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/libvirt-gconfig-d

[libvirt] [libvirt-glib PATCHv3 17/27] More GVirConfigDomainDisk setters

2011-11-23 Thread Christophe Fergeau
-- v2: fix gvir_config_device_disk_set_source use g_return_if_fail to test function args for sanity --- libvirt-gconfig/libvirt-gconfig-domain-disk.c | 78 - libvirt-gconfig/libvirt-gconfig-domain-disk.h | 11 +++- libvirt-gconfig/libvirt-gconfig.sym |

[libvirt] [libvirt-glib PATCHv3 22/27] Add to creation test

2011-11-23 Thread Christophe Fergeau
--- libvirt-gconfig/tests/test-domain-create.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c index 38a7fb9..8484b78 100644 --- a/libvirt-gconfig/tests/test-domain-create.c +++

[libvirt] [libvirt-glib PATCHv3 26/27] Add GVirConfigDomainVideo

2011-11-23 Thread Christophe Fergeau
-- v2: use g_return_if_fail to test function args for sanity v3: rename to GVirConfigDomainVideo --- libvirt-gconfig/Makefile.am|2 + libvirt-gconfig/libvirt-gconfig-domain-video.c | 133 libvirt-gconfig/libvirt-gconfig-domain-video.h | 82 ++

Re: [libvirt] [PATCH] nwfilter: remove virConnectPtr from internal API calls

2011-11-23 Thread Eric Blake
On 11/23/2011 04:27 AM, Stefan Berger wrote: > Remove the virConnectPtr from the nwfilter's internal API calls as > far as possible. > > --- > src/conf/nwfilter_conf.h | 18 ++- > src/nwfilter/nwfilter_ebiptables_driver.c | 34 -- > src/nwfilter/nwfilter_gente

[libvirt] [PATCH v2] nwfilter: Fix return value of virNWFilterHashTablePut

2011-11-23 Thread Michal Privoznik
In libvirt it is common to return value <0 on error not vice versa. --- diff to v1: -check 3rd call as well: https://www.redhat.com/archives/libvir-list/2011-November/msg01312.html src/conf/nwfilter_params.c | 16 +++--- src/nwfilter/nwfilter_gentech_driver.c | 37

[libvirt] [PATCH] qemu: fix a const-correctness issue

2011-11-23 Thread Eric Blake
Generally, functions which return malloc'd strings should be typed as 'char *', not 'const char *', to make it obvious that the caller is responsible to free things. free(const char *) fails to compile, and although we have a cast embedded in VIR_FREE to work around poor code that frees const char

Re: [libvirt] [PATCH 4/8] Support block I/O throtte in XML

2011-11-23 Thread Eric Blake
On 11/22/2011 09:45 PM, Eric Blake wrote: > subject line: s/throtte/throttle/ > > On 11/15/2011 02:02 AM, Lei Li wrote: >> Enable block I/O throttle for per-disk in XML. >> >> Signed-off-by: Lei Li >> Signed-off-by: Zhi Yong Wu >> --- >> src/conf/domain_conf.c | 101 >> ++

Re: [libvirt] [PATCH v2] nwfilter: Fix return value of virNWFilterHashTablePut

2011-11-23 Thread Eric Blake
On 11/23/2011 07:19 AM, Michal Privoznik wrote: > In libvirt it is common to return value <0 on error not vice versa. > --- > diff to v1: > -check 3rd call as well: > https://www.redhat.com/archives/libvir-list/2011-November/msg01312.html > > src/conf/nwfilter_params.c | 16 +++-

Re: [libvirt] [libvirt-glib PATCHv3 04/27] Use glib-mkenums to register enums with glib

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:47PM +0100, Christophe Fergeau wrote: > We don't currently have any enum in our API, but we will need some. > This commit adds the generation of libvirt-gconfig-enum-types.[ch] > using glib-mkenums. These files will register the various enums > that will get added to l

Re: [libvirt] [libvirt-glib PATCHv3 02/27] Add some GVirDomainConfigClock setters

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:45PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > v3: fix typo in gvir_config_domain_clock_set_variable_offset > ("timezone" -> "adjustment") > --- > libvirt-gconfig/libvirt-gconfig-domain-clock.c | 38 > ++

Re: [libvirt] [libvirt-glib PATCHv3 10/27] Add test for GVirConfigDomainOs

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:53PM +0100, Christophe Fergeau wrote: > --- > libvirt-gconfig/tests/test-domain-create.c | 19 ++- > 1 files changed, 18 insertions(+), 1 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |:

Re: [libvirt] [libvirt-glib PATCHv3 01/27] Add gobject boilerplate for GVirConfigDomain{Clock, Timer}

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:44PM +0100, Christophe Fergeau wrote: > -- > v3: rename from GVirConfig* to GVirConfigDomain* > --- > libvirt-gconfig/Makefile.am|4 + > libvirt-gconfig/libvirt-gconfig-domain-clock.c | 81 > > libvirt-gconfig/libvir

Re: [libvirt] [libvirt-glib PATCHv3 16/27] Add gvir_config_object_add_child

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:59PM +0100, Christophe Fergeau wrote: > It's similar to gvir_config_object_replace_child except that if the > current node already has a child with the correct name, it returns > the existing child instead of replacing it. > > -- > v2: instead of adding an argument to

Re: [libvirt] [libvirt-glib PATCHv3 21/27] Add gvir_config_domain_interface_network_set_source

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:04PM +0100, Christophe Fergeau wrote: > --- > .../libvirt-gconfig-domain-interface-network.c | 13 + > .../libvirt-gconfig-domain-interface-network.h |3 +++ > libvirt-gconfig/libvirt-gconfig.sym|1 + > 3 files changed, 17

Re: [libvirt] [libvirt-glib PATCHv3 03/27] Add gvir_config_domain_set_clock

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:46PM +0100, Christophe Fergeau wrote: > The implementation is likely to need to be completed later. We > might want to store pointers from GVirConfigDomain to the associated > GVirConfigDomainClock, from GVirConfigDomainClock to the GVirConfigDomain > that contains it.

Re: [libvirt] [libvirt-glib PATCHv3 07/27] Add gobject boilerplate for GVirConfigDomainOs

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:50PM +0100, Christophe Fergeau wrote: > -- > v3: rename from GVirConfigOs to GVirConfigDomainOs > --- > libvirt-gconfig/Makefile.am |2 + > libvirt-gconfig/libvirt-gconfig-domain-os.c | 79 > +++ > libvirt-gconfig/libvirt

Re: [libvirt] [libvirt-glib PATCHv3 18/27] Add test for adding a disk device

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:01PM +0100, Christophe Fergeau wrote: > --- > libvirt-gconfig/tests/test-domain-create.c | 19 +++ > 1 files changed, 19 insertions(+), 0 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: h

Re: [libvirt] [libvirt-glib PATCHv3 27/27] Don't memset GObject private data to 0

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:10PM +0100, Christophe Fergeau wrote: > The GObject private data allocated with g_type_class_add_private > will be automatically zero'ed when the GObject is created so we > don't need to memset it to 0. > --- > libvirt-gconfig/libvirt-gconfig-capabilities.c |6

Re: [libvirt] [libvirt-glib PATCHv3 17/27] More GVirConfigDomainDisk setters

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:00PM +0100, Christophe Fergeau wrote: > -- > v2: fix gvir_config_device_disk_set_source > use g_return_if_fail to test function args for sanity > --- > libvirt-gconfig/libvirt-gconfig-domain-disk.c | 78 > - > libvirt-gconfig/libvirt-gco

Re: [libvirt] [libvirt-glib PATCHv3 06/27] Create clock object in domain creation test

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:49PM +0100, Christophe Fergeau wrote: > --- > libvirt-gconfig/tests/test-domain-create.c |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.o

Re: [libvirt] [libvirt-glib PATCHv3 22/27] Add to creation test

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:05PM +0100, Christophe Fergeau wrote: > --- > libvirt-gconfig/tests/test-domain-create.c |8 > 1 files changed, 8 insertions(+), 0 deletions(-) ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvir

Re: [libvirt] [libvirt-glib PATCHv3 08/27] Add some GVirConfigDomainOs setters

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:51PM +0100, Christophe Fergeau wrote: > -- > v2: merged several related commits > use safer g_strcmp0 for string comparison > use g_return_if_fail to test function args for sanity > --- > libvirt-gconfig/libvirt-gconfig-domain-os.c | 142 > ++

Re: [libvirt] [libvirt-glib PATCHv3 15/27] Add gvir_config_domain_set_devices

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:58PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > --- > libvirt-gconfig/libvirt-gconfig-domain.c | 23 +++ > libvirt-gconfig/libvirt-gconfig-domain.h |2 ++ > libvirt-gconfig/libvirt-gcon

Re: [libvirt] [libvirt-glib PATCHv3 25/27] Add basic GVirConfigDomainGraphicsSpice

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:08PM +0100, Christophe Fergeau wrote: > Only the (non-TLS) port can be set on it > > -- > v2: rename to GVirConfigDeviceGraphicsSpice > fix node creation (missing "type" attribute) > derive GVirConfigDeviceGraphicsSpice from GVirConfigDeviceGraphics > use

Re: [libvirt] [libvirt-glib PATCHv3 24/27] Add GObject boilerplate for GVirConfigDomainGraphics

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:07PM +0100, Christophe Fergeau wrote: > This is an abstract type which will be used as a base class for the > various type of devices (spice, vnc, ...) > > -- > v3: rename to GVirConfigDomainGraphics > --- > libvirt-gconfig/Makefile.am |2 +

Re: [libvirt] [libvirt-glib PATCHv3 11/27] Add GVirConfigDomain::vcpu

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:54PM +0100, Christophe Fergeau wrote: > --- > libvirt-gconfig/libvirt-gconfig-domain.c | 29 > > libvirt-gconfig/libvirt-gconfig-domain.h |3 ++ > libvirt-gconfig/libvirt-gconfig.sym|2 + > libvirt-gconfig/tests/test

Re: [libvirt] [libvirt-glib PATCHv3 09/27] Implement gvir_config_domain_set_os

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:52PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > --- > libvirt-gconfig/libvirt-gconfig-domain.c | 12 > libvirt-gconfig/libvirt-gconfig-domain.h |3 +++ > libvirt-gconfig/libvirt-gconfig.sym

Re: [libvirt] [libvirt-glib PATCHv3 20/27] Add GVirConfigDomainInterfaceNetwork

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:03PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > v3: rename to GVirConfigDomainInterfaceNetwork > --- > libvirt-gconfig/Makefile.am|2 + > .../libvirt-gconfig-domain-interface-network.

Re: [libvirt] [libvirt-glib PATCHv3 14/27] Add various GVirConfigDomainDisk setters

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:57PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > --- > libvirt-gconfig/libvirt-gconfig-domain-disk.c | 50 > + > libvirt-gconfig/libvirt-gconfig-domain-disk.h | 25 > lib

[libvirt] virDomainBlockJobAbort and block_job_cancel

2011-11-23 Thread Stefan Hajnoczi
Block job cancellation waits until the job has been cancelled before returning. This allows clients to know that the operation has been cancelled successfully. Unfortunately, these semantics are not really possible with today's QEMU and libvirt code. A command that waits for block I/O completion

Re: [libvirt] [libvirt-glib PATCHv3 05/27] Add gvir_config_genum_get_nick helper

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:48PM +0100, Christophe Fergeau wrote: > We will often need to convert from an enum to its string > representation, add an helper for that to avoid duplicating that > code. > > -- > v2: moved before gvir_config_clock_set_offset implementation since > it needs it > ---

Re: [libvirt] [libvirt-glib PATCHv3 23/27] Add GVirConfigDomainInput

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:06PM +0100, Christophe Fergeau wrote: > -- > v2: use enum for input bus type > use g_return_if_fail to test function args for sanity > v3: rename to GVirConfigDomainInput > --- > libvirt-gconfig/Makefile.am|2 + > libvirt-gconfig/libvirt-gc

Re: [libvirt] [libvirt-glib PATCHv3 26/27] Add GVirConfigDomainVideo

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:09PM +0100, Christophe Fergeau wrote: > -- > v2: use g_return_if_fail to test function args for sanity > v3: rename to GVirConfigDomainVideo > --- > libvirt-gconfig/Makefile.am|2 + > libvirt-gconfig/libvirt-gconfig-domain-video.c | 133 > +++

Re: [libvirt] [libvirt-glib PATCHv3 12/27] Add gobject boilerplate for GVirConfigDomainDevice

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:55PM +0100, Christophe Fergeau wrote: > This is an abstract type which will be used as a base class for > all objects stored in the section of a domain. > > -- > v3: rename to GVirConfigDomainDevice > --- > libvirt-gconfig/Makefile.am |2 + >

Re: [libvirt] [libvirt-glib PATCHv3 13/27] Add gobject boilerplate for GVirConfigDomainDisk

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:34:56PM +0100, Christophe Fergeau wrote: > -- > v3: rename to GVirConfigDomainDisk > --- > libvirt-gconfig/Makefile.am |2 + > libvirt-gconfig/libvirt-gconfig-domain-disk.c | 81 > + > libvirt-gconfig/libvirt-gconfig-domai

[libvirt] [PATCH] qemu: Avoid dereference of NULL pointer

2011-11-23 Thread Peter Krempa
If something fails while initializing qemu job object in qemuDomainObjPrivateAlloc(), memory to the private pointer is freed, but after that, the pointer is still dereferenced, which may result in a segfault. * qemuDomainObjPrivateAlloc() - Don't dereference NULL pointer. --- I added the label and

Re: [libvirt] [libvirt-glib PATCHv3 19/27] Add GObject boilerplate for GVirConfigDomainInterface

2011-11-23 Thread Daniel P. Berrange
On Wed, Nov 23, 2011 at 02:35:02PM +0100, Christophe Fergeau wrote: > This base class is mainly useful as a generic type when we manipulate > list of interfaces regardless of their actual type. > > -- > v3: rename to GVirConfigDomainInterface since GVirConfigInterface > has a different purpose

Re: [libvirt] [PATCH] qemu: Avoid dereference of NULL pointer

2011-11-23 Thread Jiri Denemark
On Wed, Nov 23, 2011 at 15:58:10 +0100, Peter Krempa wrote: > If something fails while initializing qemu job object in > qemuDomainObjPrivateAlloc(), memory to the private pointer is freed, but > after that, the pointer is still dereferenced, which may result in a > segfault. > > * qemuDomainObjPr

Re: [libvirt] [PATCH] qemu: Avoid dereference of NULL pointer

2011-11-23 Thread Peter Krempa
On 11/23/2011 04:15 PM, Jiri Denemark wrote: On Wed, Nov 23, 2011 at 15:58:10 +0100, Peter Krempa wrote: src/qemu/qemu_domain.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) ACK Jirka Thanks, pushed. Peter -- libvir-list mailing list libvir-list@redhat.com https://ww

Re: [libvirt] virDomainBlockJobAbort and block_job_cancel

2011-11-23 Thread Eric Blake
On 11/23/2011 07:48 AM, Stefan Hajnoczi wrote: > This means that virDomainBlockJobAbort() returns to the client without > a guarantee that the job has completed. If the client enumerates jobs > it may still see a job that has not finished cancelling. The client > must register a handler for the B

[libvirt] ACLs for libvirt

2011-11-23 Thread Michal Privoznik
Hi all, I'd like to implement this new feature for libvirt. However, I think we should settle down on design first. My biggest concern is choosing the right level on on which ACLs will be implemented. Should be interested only in (user, API), or with more granularity (user, API, API's parameters)?

Re: [libvirt] ACLs for libvirt

2011-11-23 Thread Dave Allan
On Wed, Nov 23, 2011 at 06:17:46PM +0100, Michal Privoznik wrote: > Hi all, > > I'd like to implement this new feature for libvirt. However, I think we > should settle down on design first. My biggest concern is choosing the > right level on on which ACLs will be implemented. Should be interested

Re: [libvirt] [PATCH 3/8] Implement virDomain{Set, Get}BlockIoTune for the qemu driver

2011-11-23 Thread Eric Blake
On 11/15/2011 02:02 AM, Lei Li wrote: > Implement the block I/O throttle setting and getting support to qemu > driver. > > Signed-off-by: Lei Li > Signed-off-by: Zhi Yong Wu > --- > src/qemu/qemu_driver.c | 342 > ++ > src/qemu/qemu_monitor.c

Re: [libvirt] [PATCH 5/8] Enable the blkdeviotune command in virsh

2011-11-23 Thread Eric Blake
On 11/15/2011 02:02 AM, Lei Li wrote: > Support virsh command blkdeviotune. Can set or query a block disk > I/O throttle setting. > > Signed-off-by: Lei Li > Signed-off-by: Zhi Yong Wu > --- > tools/virsh.c | 240 > +++ > tools/virsh.pod |

Re: [libvirt] [PATCH 7/8] Support virDomain{Set, Get}BlockIoTune in the python API

2011-11-23 Thread Eric Blake
On 11/15/2011 02:02 AM, Lei Li wrote: > Python support for both setting and getting block I/O throttle. > > Signed-off-by: Lei Li > Signed-off-by: Zhi Yong Wu > --- > python/generator.py |2 + Yay - I get to undo my hack from 1/8. > python/libvirt-override-api.xml | 16

Re: [libvirt] [PATCH 8/8] Add tests for blkdeviotune

2011-11-23 Thread Eric Blake
On 11/15/2011 02:02 AM, Lei Li wrote: > Signed-off-by: Lei Li > Signed-off-by: Zhi Yong Wu > --- > .../qemuxml2argv-blkdeviotune.args |4 ++ > .../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml | 36 > > tests/qemuxml2argvtest.c

Re: [libvirt] [PATCH v2] nwfilter: Fix return value of virNWFilterHashTablePut

2011-11-23 Thread Stefan Berger
On 11/23/2011 09:41 AM, Eric Blake wrote: On 11/23/2011 07:19 AM, Michal Privoznik wrote: In libvirt it is common to return value<0 on error not vice versa. --- diff to v1: -check 3rd call as well: https://www.redhat.com/archives/libvir-list/2011-November/msg01312.html src/conf/nwfilter_param

[libvirt] [PATCHv6 1/7] Add new API virDomain{Set, Get}BlockIoTune

2011-11-23 Thread Eric Blake
From: Lei Li This patch add new pulic API virDomainSetBlockIoTune and virDomainGetBlockIoTune. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- include/libvirt/libvirt.h.in | 63 ++ python/generator.py |3 + src/driver.h

[libvirt] [PATCHv6 0/7] block io throttle via per-device block IO tuning

2011-11-23 Thread Eric Blake
Here's the latest state of Lei's patch series with all my comments folded in. I may have a few more tweaks to make now that I'm at the point of testing things with both old qemu (graceful rejection) and new qemu (sensical return values), so it may be a day or two (or even a weekend, since this is

[libvirt] [PATCHv6 2/7] Add virDomain{Set, Get}BlockIoTune support to the remote driver

2011-11-23 Thread Eric Blake
From: Lei Li Support Block I/O Throttle setting and query to remote driver. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- daemon/remote.c | 64 ++ src/libvirt.c|1 - src/remote/remote_

[libvirt] [PATCHv6 6/7] Support virDomain{Set, Get}BlockIoTune in the python API

2011-11-23 Thread Eric Blake
From: Lei Li Python support for both setting and getting block I/O throttle. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- python/generator.py |5 +- python/libvirt-override-api.xml | 16 python/libvirt-override.c | 178 +

[libvirt] [PATCHv6 4/7] Implement virDomain{Set, Get}BlockIoTune for the qemu driver

2011-11-23 Thread Eric Blake
From: Lei Li Implement the block I/O throttle setting and getting support to qemu driver. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- src/qemu/qemu_command.c | 31 src/qemu/qemu_driver.c | 340 ++ s

[libvirt] [PATCHv6 5/7] Enable the blkdeviotune command in virsh

2011-11-23 Thread Eric Blake
From: Lei Li Support virsh command blkdeviotune. Can set or query a block disk I/O throttle setting. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- tools/virsh.c | 244 +++ tools/virsh.pod | 30 +++

[libvirt] [PATCHv6 7/7] Add tests for blkdeviotune

2011-11-23 Thread Eric Blake
From: Lei Li Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- .../qemuxml2argv-blkdeviotune.args |7 .../qemuxml2argvdata/qemuxml2argv-blkdeviotune.xml | 30 tests/qemuxml2argvtest.c |2

[libvirt] [PATCHv6 3/7] Support block I/O throttle in XML

2011-11-23 Thread Eric Blake
From: Lei Li Enable block I/O throttle for per-disk in XML, as the first per-disk IO tuning parameter. Signed-off-by: Lei Li Signed-off-by: Zhi Yong Wu Signed-off-by: Eric Blake --- docs/formatdomain.html.in | 39 + docs/schemas/domaincommon.rng | 122 +

  1   2   >