Re: [libvirt] [PATCH] qemu: Use iohelper during restore

2017-05-30 Thread Shivaprasad bhat
Hi All, Can someone review the patch please ? Thanks, Shivaprasad On Wed, Mar 15, 2017 at 11:22 AM, Shivaprasad bhat < shivaprasadb...@gmail.com> wrote: > ping.. > > On Fri, Jan 27, 2017 at 4:29 PM, Shivaprasad G Bhat < > sb...@linux.vnet.ibm.com> wrote: > >> Commit afe6e58 & c4caab53 made nece

libvir-list@redhat.com

2017-05-30 Thread ZhenweiPi
--- domain.go | 13 +++-- domain_test.go | 56 +--- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/domain.go b/domain.go index 848835a..cbb22e5 100644 --- a/domain.go +++ b/domain.go @@ -30,8 +30,10 @@ import ( )

Re: [libvirt] [V4 RESEND PATCH] Expose resource control capabilites on cache bank

2017-05-30 Thread Eli Qiao
ping On Wednesday, 17 May 2017 at 5:08 PM, taget wrote: > From: Eli Qiao mailto:liyong.q...@intel.com)> > > * This patch amends the cache bank capability as follow: > > > > > > > > > > > For CDP enabled on x86 arch, we will have: > > > > > > ... > > * Added a new testdata direc

[libvirt] Availability of libvirt-3.4.0 Release Candidate 2

2017-05-30 Thread Daniel Veillard
As scheduled, I have tagged it in git and pushed signed tarball and rpms to the usual place: ftp://libvirt.org/libvirt/ no difference in my limited testing compared to rc1, looks fine https://ci.centos.org/view/libvirt/ is green except libvirt-master-build being red which looks weird. The

Re: [libvirt] [GSoC] Project of libvirt/qemu fuzzing

2017-05-30 Thread Dan
On Tue, May 30, 2017 at 02:08:54PM +0100, Stefan Hajnoczi wrote: > On Tue, May 30, 2017 at 12:03 PM, Dan wrote: > > The project of qemu command line fuzzing has been accepted as a GSoC > > project [1] [2]. As a student participating Google Summer of Code > > activity, I am extremely exitited to ge

[libvirt] [PATCH] lxc: allow defining environment variables

2017-05-30 Thread Cédric Bosdonnat
When running an application container, setting environment variables could be important. The newly introduced tag in domain configuration will allow setting environment variables to the init program. --- docs/formatdomain.html.in| 5 + docs/schemas/domaincommon.rng| 10 +

Re: [libvirt] [PATCH] CI: also run tests using updated distro(s)

2017-05-30 Thread Claudio André
Em 29/05/2017 08:54, Martin Kletzander escreveu: On Sun, May 28, 2017 at 11:07:41PM -0300, claudioandre...@gmail.com wrote: From: Claudio André 'modprobe -c' fails for some reason. Ahh! Well, it is possible to run modprobe inside Docker if I enable some options. I'll check it. Is the us

Re: [libvirt] [PATCH] maint: add sanitizers to the build process

2017-05-30 Thread Daniel P. Berrange
On Tue, May 30, 2017 at 12:28:57PM -0300, claudioandre...@gmail.com wrote: > From: Claudio André > > Sanitizers are based on compile-time instrumentation. They are available in > gcc and clang for a range of supported operation systems and platforms. More > info at: https://github.com/google/sa

Re: [libvirt] [PATCH] maint: add sanitizers to the build process

2017-05-30 Thread Claudio André
Sorry, I mean RFC. Em 30/05/2017 12:28, claudioandre...@gmail.com escreveu: From: Claudio André Sanitizers are based on compile-time instrumentation. They are available in gcc and clang for a range of supported operation systems and platforms. More info at: https://github.com/google/sanitize

[libvirt] [PATCH] maint: add sanitizers to the build process

2017-05-30 Thread claudioandre . br
From: Claudio André Sanitizers are based on compile-time instrumentation. They are available in gcc and clang for a range of supported operation systems and platforms. More info at: https://github.com/google/sanitizers The address sanitizer finds bugs related to addressing memory: use after fr

Re: [libvirt] [PATCH 5/9] util: Introduce virObjectLockableRecursiveNew

2017-05-30 Thread John Ferlan
On 05/30/2017 09:19 AM, Daniel P. Berrange wrote: > On Tue, May 30, 2017 at 03:03:14PM +0200, Pavel Hrdina wrote: >> On Tue, May 30, 2017 at 07:38:17AM -0400, John Ferlan wrote: >>> Introduce a recursive option for the lockable object which calls >>> virMutexInitRecursive instead of virMutexInit.

Re: [libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread Daniel P. Berrange
On Tue, May 30, 2017 at 10:43:35AM -0400, John Ferlan wrote: > > > On 05/30/2017 09:00 AM, Daniel P. Berrange wrote: > > On Tue, May 30, 2017 at 07:38:16AM -0400, John Ferlan wrote: > >> The virObject logic "assumes" that whatever is passed to its API's > >> would be some sort of virObjectPtr; ho

Re: [libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread John Ferlan
On 05/30/2017 09:00 AM, Daniel P. Berrange wrote: > On Tue, May 30, 2017 at 07:38:16AM -0400, John Ferlan wrote: >> The virObject logic "assumes" that whatever is passed to its API's >> would be some sort of virObjectPtr; however, if it is not then some >> really bad things can happen. >> >> So f

Re: [libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread John Ferlan
On 05/30/2017 08:50 AM, Pavel Hrdina wrote: > On Tue, May 30, 2017 at 07:38:16AM -0400, John Ferlan wrote: >> The virObject logic "assumes" that whatever is passed to its API's >> would be some sort of virObjectPtr; however, if it is not then some >> really bad things can happen. >> >> So far the

Re: [libvirt] [PATCH go-xml] Add support for Node Device with basic testing.

2017-05-30 Thread Vladik Romanovsky
Thanks for the review. On Tue, May 30, 2017 at 8:46 AM, Daniel P. Berrange wrote: > On Mon, May 29, 2017 at 03:58:52AM -0400, Vladik Romanovsky wrote: >> --- >> node_device.go | 277 >> >> node_device_test.go | 111 +

Re: [libvirt] [PATCH v3 2/3] qemu : Add loadparm to qemu command line string

2017-05-30 Thread Farhan Ali
On 05/26/2017 04:03 PM, John Ferlan wrote: ... Was there ever thought to adding loadparm to the machine XML? What's the reasoning to not have it there. If it's only valid for bootindex=1, then it's far easier to check if the machine XML has it defined rather than perusing the disk/network

Re: [libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread John Ferlan
On 05/30/2017 08:13 AM, Bjoern Walk wrote: > John Ferlan [2017-05-30, 06:43AM -0400]: >> [...] >> void >> -virInterfaceObjFree(virInterfaceObjPtr obj) >> +virInterfaceObjEndAPI(virInterfaceObjPtr *obj) > > Naming is hard, and I don't have any better suggestion. Just wanted to > say that the nam

[libvirt] [PATCH 3/9] util: Generate a common internal only error print

2017-05-30 Thread John Ferlan
If virObjectIsClass fails "internally" to virobject.c, create a macro to generate the VIR_WARN describing what the problem is. Also improve the checks and message a bit to indicate which was the failure - whether the obj was NULL or just not the right class Signed-off-by: John Ferlan --- src/uti

Re: [libvirt] [PATCH 5/9] util: Introduce virObjectLockableRecursiveNew

2017-05-30 Thread Daniel P. Berrange
On Tue, May 30, 2017 at 03:03:14PM +0200, Pavel Hrdina wrote: > On Tue, May 30, 2017 at 07:38:17AM -0400, John Ferlan wrote: > > Introduce a recursive option for the lockable object which calls > > virMutexInitRecursive instead of virMutexInit. > > We should avoid using recursive lock because they

Re: [libvirt] [PATCH 09/18] Add virtio-related options to interfaces

2017-05-30 Thread Daniel P. Berrange
On Tue, May 30, 2017 at 02:50:32PM +0200, Ján Tomko wrote: > > > > > Feels like we could just use 'iommu=on' as the name. Also, I'm unclear whether we actually need the 'ats' attribute. >From the description it sounds like if we have device_iotlb=on for the IOMMU device, then we shou

Re: [libvirt] [GSoC] Project of libvirt/qemu fuzzing

2017-05-30 Thread Stefan Hajnoczi
On Tue, May 30, 2017 at 12:03 PM, Dan wrote: > The project of qemu command line fuzzing has been accepted as a GSoC > project [1] [2]. As a student participating Google Summer of Code > activity, I am extremely exitited to get started today on May 30th, > 2017. Welcome! Great project idea, I am

Re: [libvirt] [PATCH 5/9] util: Introduce virObjectLockableRecursiveNew

2017-05-30 Thread Pavel Hrdina
On Tue, May 30, 2017 at 07:38:17AM -0400, John Ferlan wrote: > Introduce a recursive option for the lockable object which calls > virMutexInitRecursive instead of virMutexInit. We should avoid using recursive lock because they are dangerous. I would rather cleanup the nwfilter code than introduci

Re: [libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread Daniel P. Berrange
On Tue, May 30, 2017 at 07:38:16AM -0400, John Ferlan wrote: > The virObject logic "assumes" that whatever is passed to its API's > would be some sort of virObjectPtr; however, if it is not then some > really bad things can happen. > > So far there's been only virObject{Ref|Unref}, virObject{Lock|

[libvirt] [PATCH 18/18] qemu: format virtio-related options on the command line

2017-05-30 Thread Ján Tomko
Format iommu_platform= and ats= for virtio devices. https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- src/qemu/qemu_capabilities.c | 12 - src/qemu/qemu_capabilities.h | 2 + src/qemu/qemu_command.c| 58 +++

[libvirt] [PATCH 11/18] Add virtio-related options to disks

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 5 + docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 9 + src/conf/domain_conf.h

[libvirt] [PATCH 10/18] add virtio-related options to memballoon

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 7 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c | 21 + src/conf/domain_conf.h

[libvirt] [PATCH 12/18] Add virtio-related options to controllers

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 6 ++ docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 8 src/conf/domain_conf.h

[libvirt] [PATCH 00/18] Allow virtio devices to use vIOMMU

2017-05-30 Thread Ján Tomko
[Adding Jason to cc - could you please take a look at the documentation (patches 6 and 8) and point out any device/option combinations that do not make sense?] https://bugzilla.redhat.com/show_bug.cgi?id=1283251 Ján Tomko (18): conf: introduce virDomainControllerDriverFormat conf: use a separ

[libvirt] [PATCH 03/18] conf: only format as a pair tag when needed

2017-05-30 Thread Ján Tomko
Make the decision based on the usage of childBuf buffer. This fixes the oddity in the test case introduced by commit c1c4d0d where we would format an empty pair tag. --- src/conf/domain_conf.c | 4 +++- tests/qemuxml2xmloutdata/qemuxml2xmlout-s390-defaultc

[libvirt] [PATCH 15/18] Add virtio-related options to video

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 12 +++ docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c | 24 -- src/conf/domain_conf.h

[libvirt] [PATCH 17/18] qemuxml2argvtest: add virtio-options test case

2017-05-30 Thread Ján Tomko
Add a test case to demonstrate the addition of new command line options https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- .../qemuxml2argv-virtio-options.args | 47 ++ tests/qemuxml2argvtest.c | 9 + 2 files changed, 56 insert

[libvirt] [PATCH 09/18] Add virtio-related options to interfaces

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 19 +++ docs/schemas/domaincommon.rng | 12 + src/conf/domain_conf.c | 63 ++ src/conf/domain_conf.h

[libvirt] [PATCH 14/18] Add virtio-related options to rng devices

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in| 11 +++ docs/schemas/domaincommon.rng| 5 + src/conf/domain_conf.c | 16 src/conf/domain_co

[libvirt] [PATCH 16/18] Add virtio-related options to input devices

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 13 + docs/schemas/domaincommon.rng | 5 + src/conf/domain_conf.c| 15 +++ src/conf/domai

[libvirt] [PATCH 01/18] conf: introduce virDomainControllerDriverFormat

2017-05-30 Thread Ján Tomko
Split out formatting the subelement of to make adding new options easier. --- src/conf/domain_conf.c | 55 +- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index c7e20b8..318e254 100

[libvirt] [PATCH 13/18] Add virtio-related options to filesystems

2017-05-30 Thread Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 5 + docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 8 src/conf/domain_conf.h

[libvirt] [PATCH 02/18] conf: use a separate buffer for the subelements of

2017-05-30 Thread Ján Tomko
We need to decide whether to format as a single tag or if it has any subelements. Rewrite the function to use a separate buffer for subelements, to make adding new options easier. --- src/conf/domain_conf.c | 36 +++- 1 file changed, 19 insertions(+), 17 deletions

[libvirt] [PATCH 08/18] qemuxml2xmltest: add virtio-options test

2017-05-30 Thread Ján Tomko
Add a test case with all the virtio devices we know to demonstrate the addition of new options. https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- .../qemuxml2argv-virtio-options.xml| 92 ++ .../qemuxml2xmlout-virtio-options.xml | 92 +

[libvirt] [PATCH 07/18] qemu: format device-iotlb on intel-iommu command line

2017-05-30 Thread Ján Tomko
Format the device-iotlb attribute. https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- src/qemu/qemu_capabilities.c | 3 +++ src/qemu/qemu_capabilities.h | 3 +++ src/qemu/qemu_command.c | 11 +++ tests/

[libvirt] [PATCH 04/18] conf: eliminate monster condition in virDomainControllerDefFormat

2017-05-30 Thread Ján Tomko
Move most of the subelement formatting out of the giant if. --- src/conf/domain_conf.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 57f52be..81385d6 100644 --- a/src/conf/domain_conf.c +++ b/src/co

[libvirt] [PATCH 06/18] conf: add device_iotlb attribute to iommu

2017-05-30 Thread Ján Tomko
Add a new device_iotlb attribute to the iommu device to control the device IOTLB support for intel-iommu. https://bugzilla.redhat.com/show_bug.cgi?id=1283251 --- docs/formatdomain.html.in | 9 +++ docs/schemas/domaincommon.rng | 5 src/conf

[libvirt] [PATCH 05/18] virDomainControllerDefFormat: move PCI model and target formatting

2017-05-30 Thread Ján Tomko
These can be formatted right when we know we will need them. No need for separate bool variables. --- src/conf/domain_conf.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 81385d6..b47a376 1

Re: [libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread Pavel Hrdina
On Tue, May 30, 2017 at 07:38:16AM -0400, John Ferlan wrote: > The virObject logic "assumes" that whatever is passed to its API's > would be some sort of virObjectPtr; however, if it is not then some > really bad things can happen. > > So far there's been only virObject{Ref|Unref}, virObject{Lock|

Re: [libvirt] [PATCH go-xml] Add support for Node Device with basic testing.

2017-05-30 Thread Daniel P. Berrange
On Mon, May 29, 2017 at 03:58:52AM -0400, Vladik Romanovsky wrote: > --- > node_device.go | 277 > > node_device_test.go | 111 + > 2 files changed, 388 insertions(+) > create mode 100644 node_device.go > create mode

Re: [libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread Bjoern Walk
John Ferlan [2017-05-30, 06:43AM -0400]: [...] void -virInterfaceObjFree(virInterfaceObjPtr obj) +virInterfaceObjEndAPI(virInterfaceObjPtr *obj) Naming is hard, and I don't have any better suggestion. Just wanted to say that the name is, maybe, improvable :) { -if (!obj) +if (!*obj)

Re: [libvirt] [PATCH v3 8/9] interface: Introduce virInterfaceObjNew

2017-05-30 Thread Bjoern Walk
John Ferlan [2017-05-30, 06:43AM -0400]: Create/use a helper to perform the object allocation Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/conf/virinterfaceobj.c b/src/conf/viri

[libvirt] [PATCH 8/9] util: Introduce virObjectPoolableDef

2017-05-30 Thread John Ferlan
Add a new virObjectPoolableHashElement child which will be used to provide the basis for driver def/newDef elements. Each virObjectPoolableDef has: 1. A @recursive argument to denote which type of locks to use. 2. A required @primaryKey to be used to uniquely identity the object by some

[libvirt] [PATCH 1/9] util: Formatting cleanups to virobject API

2017-05-30 Thread John Ferlan
Alter to use more recent formatting guidelines Signed-off-by: John Ferlan --- src/util/virobject.c | 64 ++-- src/util/virobject.h | 59 2 files changed, 82 insertions(+), 41 deletions(-) diff --git

[libvirt] [PATCH 4/9] util: Add magic_marker for all virObjects

2017-05-30 Thread John Ferlan
The virObject logic "assumes" that whatever is passed to its API's would be some sort of virObjectPtr; however, if it is not then some really bad things can happen. So far there's been only virObject{Ref|Unref}, virObject{Lock|Unlock}, and virObjectIsClass and the virObject and virObjectLockable c

[libvirt] [PATCH 6/9] util: Introduce virObjectPoolableHashElement

2017-05-30 Thread John Ferlan
Add a new virObjectLockable child which will be used to more generically describe driver objects. Eventually these objects will be placed into a more generic hash table object which will take care of object mgmt functions. Each virObjectPoolableHashElement will have a primaryKey (required) and a s

[libvirt] [PATCH 2/9] util: Introduce virObjectGetLockableObj

2017-05-30 Thread John Ferlan
Split out the object fetch in virObject{Lock|Unlock} into a helper Signed-off-by: John Ferlan --- src/util/virobject.c | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/util/virobject.c b/src/util/virobject.c index 792685b..34805d3 100644 --

[libvirt] [PATCH 9/9] util: Add virObjectPoolableDef* accessor API's

2017-05-30 Thread John Ferlan
Add new API's for object management: virObjectPoolableDefGetDef - Just return the obj->def from the object. virObjectPoolableDefSetDef - If the new @def is non-NULL, replace the previous obj->def with the new @def argument calling the obj->defFreeFunc on the pr

[libvirt] [PATCH 5/9] util: Introduce virObjectLockableRecursiveNew

2017-05-30 Thread John Ferlan
Introduce a recursive option for the lockable object which calls virMutexInitRecursive instead of virMutexInit. Signed-off-by: John Ferlan --- src/libvirt_private.syms | 1 + src/util/virobject.c | 26 ++ src/util/virobject.h | 4 3 files changed, 31 insert

[libvirt] [PATCH 7/9] util: Add virObjectPoolableHashElementGet*Key

2017-05-30 Thread John Ferlan
Add a pair of accessor API's: virObjectPoolableHashElementGetPrimaryKey virObjectPoolableHashElementGetSecondaryKey which will return the requested key from the object to the caller. It is up to the caller to check the returned key and error if the return value is NULL. Signed-off-by: Joh

[libvirt] [PATCH 0/9] virObject adjustments for common object

2017-05-30 Thread John Ferlan
Originally posted in part as an RFC: https://www.redhat.com/archives/libvir-list/2017-April/msg00321.html Obviously not a 3.4.0 discussion, but I'm trying to get ahead of the curve for 3.5.0 and posting this now as I'm "close enough" to at least convert secrets, nwfilters, nodedevs, and interface

[libvirt] [PATCH] qemu: hotplug: Release address properly when redirected device attach failure

2017-05-30 Thread Shivaprasad G Bhat
The virDomainUSBAddressEnsure returns 0 or -1 and checking for 1 is wrong. Fix it. Signed-off-by: Shivaprasad G Bhat --- src/qemu/qemu_hotplug.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 4a7d997..f339148 1

Re: [libvirt] [PATCH] qemu: Don't error out if allocation info can't be queried

2017-05-30 Thread John Ferlan
On 05/29/2017 11:04 AM, Peter Krempa wrote: > qemuDomainGetBlockInfo would error out if qemu did not report > 'wr_highest_offset'. This usually does not happen, but can happen > briefly during active layer block commit. There's no need to report the > error, we can simply report that the disk is

[libvirt] [GSoC] Project of libvirt/qemu fuzzing

2017-05-30 Thread Dan
Dear all, The project of qemu command line fuzzing has been accepted as a GSoC project [1] [2]. As a student participating Google Summer of Code activity, I am extremely exitited to get started today on May 30th, 2017. During the past months, I have received tremendous guidance from my mentors as

Re: [libvirt] [libvirt-sandbox PATCH] Drop library/ from template name and image path

2017-05-30 Thread Daniel P. Berrange
On Sat, May 27, 2017 at 06:29:32PM +0200, Guido Günther wrote: > If one pastes from the output of virt-sansbox-image > > $ virt-sandbox-image list > docker:/library/ubuntu?tag=17.04 > docker:/library/debian?tag=latest > > verbatim > > $ virt-sandbox-image run -c qemu:///session > docker

[libvirt] [PATCH 2/2] fdstream: Report error from the I/O thread

2017-05-30 Thread Michal Privoznik
Problem with our error reporting is that the error object is a thread local variable. That means if there's an error reported within the I/O thread it gets logged and everything, but later when the event loop aborts the stream it doesn't see the original error. So we are left with some generic erro

[libvirt] [PATCH 1/2] virfdstream: Check for thread error more frequently

2017-05-30 Thread Michal Privoznik
When the I/O thread quits (e.g. due to an I/O error, lseek() error, whatever), any subsequent virFDStream API should return error too. Moreover, when invoking stream event callback, we must set the VIR_STREAM_EVENT_ERROR flag so that the callback knows something bad happened. Signed-off-by: Michal

[libvirt] [PATCH 0/2] Two simple sparse streams fixes

2017-05-30 Thread Michal Privoznik
I've been experimenting with sparse streams and found a bug. If you try to download a volume which doesn't support sparseness here's what happens: # virsh vol-download --sparse /dev/disk/by-path/ip-XX.XX.XX.XX:3260-iscsi-iqn.2017-03.com.blah:server-lun-0 /mnt/floppy/blah.raw # echo $? 0 # ls -l

[libvirt] [PATCH v3 9/9] interface: Convert virInterfaceObj to use virObjectLockable

2017-05-30 Thread John Ferlan
Now that we have a bit more control, let's convert our object into a lockable object and let that magic handle the create and lock/unlock. This commit also introduces virInterfaceObjEndAPI in order to handle the lock unlock and object unref in one call for consumers returning a NULL obj upon retur

[libvirt] [PATCH v3 6/9] interface: Rename some virInterfaceObj* API's

2017-05-30 Thread John Ferlan
Prefix should have been virInterfaceObjList since the API is operating on the list of interfaces. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 37 +++-- src/conf/virinterfaceobj.h | 31 --- src/libvirt_private.syms | 12

[libvirt] [PATCH v3 5/9] interface: Make _virInterfaceObjList struct private

2017-05-30 Thread John Ferlan
Move the structs into virinterfaceobj.c, create necessary accessors, and initializers. This also includes reworking virInterfaceObjListClone to handle receiving a source interfaces list pointer, creating the destination interfaces object, and copying everything from source into dest. Signed-off-b

[libvirt] [PATCH v3 2/9] interface: Remove some unnecessary goto's for Interface tests

2017-05-30 Thread John Ferlan
Rather than using goto cleanup on object find failure and having cleanup need to check if the obj was present before unlocking, just return immediately. Signed-off-by: John Ferlan --- src/test/test_driver.c | 35 --- 1 file changed, 12 insertions(+), 23 deletions(

[libvirt] [PATCH v3 3/9] interface: Use virInterfaceDefPtr rather than deref from virInterfaceObjPtr

2017-05-30 Thread John Ferlan
We're about to make the obj much more private, so make it easier to see future changes which will require accessors for the obj->def This also includes modifying some interfaces->objs[i]->X references to be obj = interfaces->objs[i]; and then def = obj->def Signed-off-by: John Ferlan --- src/co

[libvirt] [PATCH v3 0/9] Multiple cleanups within interfaceobj and interface driver

2017-05-30 Thread John Ferlan
v2: https://www.redhat.com/archives/libvir-list/2017-May/msg01059.html v1: https://www.redhat.com/archives/libvir-list/2017-April/msg01225.html Patches 1-7 were acked in v1 with a request to "show" the next step in a 9/8 patch to convert to using virObject for virInterfaceObj. v2 added that, but

[libvirt] [PATCH v3 8/9] interface: Introduce virInterfaceObjNew

2017-05-30 Thread John Ferlan
Create/use a helper to perform the object allocation Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/conf/virinterfaceobj.c b/src/conf/virinterfaceobj.c index 8bd8094..1e3f25c 10064

[libvirt] [PATCH v3 1/9] interface: Consistently use 'obj' for a virInterfaceObjPtr

2017-05-30 Thread John Ferlan
Alter variable names to be obj rather than 'iface' and/or 'obj'. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 48 ++-- src/conf/virinterfaceobj.h | 4 +-- src/test/test_driver.c | 78 +++--- 3 files changed, 65 i

[libvirt] [PATCH v3 4/9] interface: Make _virInterfaceObj struct private

2017-05-30 Thread John Ferlan
Move the struct into virinterfaceobj.c, create necessary accessors, and initializers. Signed-off-by: John Ferlan --- src/conf/virinterfaceobj.c | 28 src/conf/virinterfaceobj.h | 20 +--- src/libvirt_private.syms | 3 +++ src/test/test_driver.c

[libvirt] [PATCH v3 7/9] interface: Clean up virInterfaceObjListFindByMACString

2017-05-30 Thread John Ferlan
Alter the algorithm to return a list of matching names rather than a list of match virInterfaceObjPtr which are then just dereferenced extracting the def->name and def->mac. Since the def->mac would be the same as the passed @mac, just return a list of names and as long as there's only one, extract

Re: [libvirt] [PATCH v2] nodedev: Increase the netlink socket buffer size to the one used by udev

2017-05-30 Thread Daniel P. Berrange
On Fri, May 19, 2017 at 03:16:26PM +0200, Erik Skultety wrote: > From: "ning.bo" > > When a number of SRIOV VFs (up to 128 on Intel XL710) is created: > for i in `seq 0 1`; do > echo 63 > /sys/class/net//device/sriov_numvfs > done > > libvirtd will then report "udev_monitor_receive_device retu

Re: [libvirt] [PATCH] qemu:json: Fix daemon crash on handling domain shutdown event

2017-05-30 Thread Erik Skultety
On Tue, May 30, 2017 at 10:53:44AM +0200, Peter Krempa wrote: > On Tue, May 30, 2017 at 10:41:17 +0200, Erik Skultety wrote: > > commit a8eba5036 added further checking of the guest shutdown cause, but > > this enhancement is available since qemu 2.10, causing a crash because > > of a NULL pointer

Re: [libvirt] [PATCH] qemu:json: Fix daemon crash on handling domain shutdown event

2017-05-30 Thread Peter Krempa
On Tue, May 30, 2017 at 10:41:17 +0200, Erik Skultety wrote: > commit a8eba5036 added further checking of the guest shutdown cause, but > this enhancement is available since qemu 2.10, causing a crash because > of a NULL pointer dereference on older qemus. > > Thread 1 "libvirtd" received signal S

[libvirt] [PATCH] qemu:json: Fix daemon crash on handling domain shutdown event

2017-05-30 Thread Erik Skultety
commit a8eba5036 added further checking of the guest shutdown cause, but this enhancement is available since qemu 2.10, causing a crash because of a NULL pointer dereference on older qemus. Thread 1 "libvirtd" received signal SIGSEGV, Segmentation fault. 0x772441af in virJSONValueObjectGet

Re: [libvirt] [PATCH v3] Regression: Report correct CPUs present on executing virsh nodecpumap

2017-05-30 Thread Peter Krempa
On Thu, May 25, 2017 at 15:47:43 +0530, Nitesh Konkar wrote: > On executing the virsh nodecpumap command, the number > of CPUs present was shown as (last cpu online id + 1). This > patch fixes the issue by reporting the current number of > CPUs present. Both the summary and commit message mention