On Oct 2, 2020, at 2:48 AM, Pino Toscano wrote:
> IMHO these explanations should be documented in the Hyper-V driver
> page: docs/drvhyperv.html.in. This way, users know about the different
> value returned by virConnectGetVersion() by the Hyper-V driver, and
> can unmangle it to get the real
On Oct 2, 2020, at 2:07 AM, Pino Toscano wrote:
>
> One general note for all the patches: NEWS.rst is updated as a whole
> at the end, as separate commit. This eases cherry-picking, removes
> dependencies between patches that would not conflict otherwise, and
> avoids churn in each patch.
On Oct 2, 2020, at 2:25 AM, Pino Toscano wrote:
> Note that now hypervGetVirtualSystemByID() issues VIR_ERR_INTERNAL_ERROR
> in case / *computerSystemList is null, instead of
> VIR_ERR_NO_DOMAIN. Shouldn't this still be able to explicitly report
> when the requested domain does not exist?
I’ll
On Fri, Oct 02, 2020 at 11:31:32AM -0400, Masayoshi Mizuma wrote:
> Hello Jan, and Michal,
>
> commit: 88957116c9 ("qemu: Use memory-backend-* for regular guest memory")
> gets
> the system memory sharable without numa config.
> The qemu options with the patch will be like as:
>
> -machine
>
On 10/1/20 10:35 AM, Daniel Henrique Barboza wrote:
When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
will expect the pidfile to be written before exiting, sitting
tight in a saferead() call waiting.
The child then does process tuning (via virProcessSet* functions)
before writing
On Fri, Oct 2, 2020 at 7:34 AM Daniel P. Berrangé wrote:
>
> 2 years back I proposed dropping the sheepdog mailing list from the
> MAINTAINERS file, but somehow the patch never got picked up:
>
> https://lists.gnu.org/archive/html/qemu-block/2018-03/msg01048.html
>
> So here I am with the same
On Oct 2, 2020, at 2:26 AM, Pino Toscano wrote:
> This change seems unrelated to the patch. Can you please split it in an
> own commit?
I originally had the macro in this header and had moved the function
next to the other closely-related functions. Since I moved the macro to
hyperv_driver.c,
On 10/2/20 2:28 PM, Michal Prívozník wrote:
On 10/2/20 6:42 PM, Daniel Henrique Barboza wrote:
On 10/2/20 1:07 PM, Michal Prívozník wrote:
On 10/1/20 4:35 PM, Daniel Henrique Barboza wrote:
When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
[...]
Resolves:
On 10/2/20 6:42 PM, Daniel Henrique Barboza wrote:
On 10/2/20 1:07 PM, Michal Prívozník wrote:
On 10/1/20 4:35 PM, Daniel Henrique Barboza wrote:
When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
[...]
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1882093
On 10/2/20 1:07 PM, Michal Prívozník wrote:
On 10/1/20 4:35 PM, Daniel Henrique Barboza wrote:
When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
[...]
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1882093
Signed-off-by: Daniel Henrique Barboza
---
xml:
qemu:
qemu -device virtio-balloon-pci,...,free-page-reporting=on
This kernel feature allows for more stable and resource friendly systems.
Signed-off-by: Nico Pache
---
docs/formatdomain.rst | 6 ++
docs/schemas/domaincommon.rng | 5
gitlab issue: https://gitlab.com/libvirt/libvirt/-/issues/79
The virtio-balloon device now has the ability to report free pages
back to the hypervisor for reuse by other programs.
This kernel feature allows for more stable and resource friendly systems.
This feature is available in QEMU and is
On 10/1/20 4:35 PM, Daniel Henrique Barboza wrote:
When VIR_EXEC_DAEMON is true and cmd->pidfile exists, the parent
will expect the pidfile to be written before exiting, sitting
tight in a saferead() call waiting.
The child then does process tuning (via virProcessSet* functions)
before writing
On a Friday in 2020, Peter Krempa wrote:
On Fri, Oct 02, 2020 at 10:50:55 +0200, Ján Tomko wrote:
On a Friday in 2020, Peter Krempa wrote:
> Signed-off-by: Peter Krempa
> ---
> tests/virbitmaptest.c | 73 ++-
> 1 file changed, 24 insertions(+), 49
On a Friday in 2020, Peter Krempa wrote:
On Fri, Oct 02, 2020 at 13:17:17 +0200, Ján Tomko wrote:
On a Friday in 2020, Peter Krempa wrote:
> Clarify which bit is considered most significant in the bitmap and
> resulting string. Also be explicit that it's a hex string.
>
> Signed-off-by: Peter
On a Friday in 2020, Peter Krempa wrote:
On Fri, Oct 02, 2020 at 12:47:48 +0200, Ján Tomko wrote:
On a Friday in 2020, Peter Krempa wrote:
> Test an empty bitmap including it's extension via the self-expanding
> APIs and and a "0" and "" strings when converting the string back and
> forth.
>
>
On Fri, Oct 02, 2020 at 10:50:55 +0200, Ján Tomko wrote:
> On a Friday in 2020, Peter Krempa wrote:
> > Signed-off-by: Peter Krempa
> > ---
> > tests/virbitmaptest.c | 73 ++-
> > 1 file changed, 24 insertions(+), 49 deletions(-)
> >
> > diff --git
Hello Jan, and Michal,
commit: 88957116c9 ("qemu: Use memory-backend-* for regular guest memory") gets
the system memory sharable without numa config.
The qemu options with the patch will be like as:
-machine
On Fri, Oct 02, 2020 at 13:17:17 +0200, Ján Tomko wrote:
> On a Friday in 2020, Peter Krempa wrote:
> > Clarify which bit is considered most significant in the bitmap and
> > resulting string. Also be explicit that it's a hex string.
> >
> > Signed-off-by: Peter Krempa
> > ---
> >
On Fri, Oct 02, 2020 at 04:47:59PM +0200, Peter Krempa wrote:
> On Fri, Oct 02, 2020 at 15:12:45 +0100, Daniel Berrange wrote:
> > Signed-off-by: Daniel P. Berrangé
> > ---
>
> [...]
>
> > diff --git a/docs/manpages/virt-login-shell.rst
> > b/docs/manpages/virt-login-shell.rst
> > index
On Fri, Oct 02, 2020 at 15:12:44 +0100, Daniel Berrange wrote:
>
>
> Daniel P. Berrangé (5):
> docs: fix misc spelling errors reported by codespell
Please see my specific reply.
> src: fix misc spelling errors reported by codespell
> tests: fix misc spelling errors reported by codespell
On Fri, Oct 02, 2020 at 15:12:45 +0100, Daniel Berrange wrote:
> Signed-off-by: Daniel P. Berrangé
> ---
[...]
> diff --git a/docs/manpages/virt-login-shell.rst
> b/docs/manpages/virt-login-shell.rst
> index 3833a3e912..1e95d5d2b4 100644
> --- a/docs/manpages/virt-login-shell.rst
> +++
The code is ok but the commit message can be improved. Usually
we want a commit title with a single-line summary of what you're
changing, a blank line, and a description describes in more
the change, and your signed-off tag. This guideline can be
found here:
Signed-off-by: Daniel P. Berrangé
---
examples/c/admin/list_clients.c | 2 +-
examples/c/admin/list_servers.c | 2 +-
examples/c/domain/info1.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/examples/c/admin/list_clients.c b/examples/c/admin/list_clients.c
index
Signed-off-by: Daniel P. Berrangé
---
src/esx/esx_vi.c | 4 ++--
src/libvirt-domain.c | 4 ++--
src/locking/virtlockd.service.in | 2 +-
src/logging/virtlogd.service.in | 2 +-
src/qemu/qemu_qapi.c | 4 ++--
src/remote/remote_daemon.c | 2 +-
Signed-off-by: Daniel P. Berrangé
---
tools/virsh-completer.c| 2 +-
tools/virsh-pool.c | 2 +-
tools/wireshark/util/genxdrstub.pl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
index
Signed-off-by: Daniel P. Berrangé
---
tests/vircgroupmock.c | 2 +-
tests/virmockstathelpers.c| 4 ++--
tests/virnetdaemondata/README | 2 +-
tests/virpcimock.c| 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/vircgroupmock.c
Daniel P. Berrangé (5):
docs: fix misc spelling errors reported by codespell
src: fix misc spelling errors reported by codespell
tests: fix misc spelling errors reported by codespell
tools: fix misc spelling errors reported by codespell
examples: fix misc spelling errors reported by
Signed-off-by: Daniel P. Berrangé
---
NEWS.rst | 8
docs/auth.html.in | 2 +-
docs/daemons.rst | 4 ++--
docs/drvesx.html.in| 6 +++---
docs/drvxen.html.in| 2 +-
docs/format.html.in
On 9/24/20 11:12 AM, Zhenyu Zheng wrote:
Modify virCPUarmCompare in cpu_arm.c to perform compare action.
This patch only adds host to host CPU compare, the rest cases
remains the same. This is useful for source and destination host
compare during migrations to avoid migration between
On Fri, Oct 02, 2020 at 15:32:48 +0200, Mauro Matteo Cascella wrote:
> Signed-off-by: Mauro Matteo Cascella
> ---
> docs/submitting-patches.rst | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/docs/submitting-patches.rst b/docs/submitting-patches.rst
> index
Signed-off-by: Mauro Matteo Cascella
---
docs/submitting-patches.rst | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/docs/submitting-patches.rst b/docs/submitting-patches.rst
index 17b072655d..3ce8b347a0 100644
--- a/docs/submitting-patches.rst
+++
On Fri, Oct 02, 2020 at 12:47:48 +0200, Ján Tomko wrote:
> On a Friday in 2020, Peter Krempa wrote:
> > Test an empty bitmap including it's extension via the self-expanding
> > APIs and and a "0" and "" strings when converting the string back and
> > forth.
> >
> > Signed-off-by: Peter Krempa
>
Thanks for noticing. I actually followed the instructions at [1] and
forgot to sign the commit. I will send another patch to add a
reference on that page as well.
[1] https://libvirt.org/submitting-patches.html
Signed-off-by: Mauro Matteo Cascella
On Fri, Oct 2, 2020 at 1:26 PM Ján Tomko
On a Friday in 2020, Peter Krempa wrote:
If we use g_new0 there's no need for the 'cleanup' label as there's
nothing to fail after the allocation.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git
On a Friday in 2020, Peter Krempa wrote:
After recent refactors the function can be refactored to remove the
'cleanup' label by using autoptr for the 'map' variable.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_hotplug.c | 19 ++-
1 file changed, 6 insertions(+), 13
Also, s/bitmp/bitmap/ in the commit summary.
Jano
On a Friday in 2020, Ján Tomko wrote:
On a Friday in 2020, Peter Krempa wrote:
It can be replaced by virBitmapNew(0).
Signed-off-by: Peter Krempa
---
src/conf/numa_conf.c | 2 +-
src/libvirt_private.syms | 1 -
src/util/virbitmap.c |
On a Friday in 2020, Peter Krempa wrote:
There are only 3 places using the function. Two can use virBitmapNewCopy
directly. In case of the qemu capabilities code we need to free the old
bitmap first.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 3 +--
On a Friday in 2020, Peter Krempa wrote:
The function is now unused.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 -
src/util/virbitmap.c | 23 ---
src/util/virbitmap.h | 6 --
3 files changed, 30 deletions(-)
Reviewed-by: Ján Tomko
Jano
On a Friday in 2020, Peter Krempa wrote:
The function will not fail any more.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 3 +--
src/conf/domain_conf.c | 7 +--
src/conf/numa_conf.c | 4 ++--
src/qemu/qemu_driver.c | 13 +++--
On a Friday in 2020, Peter Krempa wrote:
virBitmapCopy has a failure condition, which is impossible to meet when
creating a new copy. Copy the contents directly to make it obvious that
virBitmapNewCopy can't fail.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 10 ++
1 file
The sheepdog mailing list is setup to stop and queue messages from
non-subscribers, pending moderator approval. Unfortunately it seems
that the moderation queue is not actively dealt with. Even when messages
are approved, the sender is never added to the whitelist, so every
future mail from the
This thread from a little over a year ago:
http://lists.wpkg.org/pipermail/sheepdog/2019-March/thread.html
states that sheepdog is no longer actively developed. The only mentioned
users are some companies who are said to have it for legacy reasons with
plans to replace it by Ceph. There is
2 years back I proposed dropping the sheepdog mailing list from the
MAINTAINERS file, but somehow the patch never got picked up:
https://lists.gnu.org/archive/html/qemu-block/2018-03/msg01048.html
So here I am with the same patch again.
This time I go further and deprecate the sheepdog driver
On a Friday in 2020, Mauro Matteo Cascella wrote:
---
A 'Signed-off-by' line to indicate your compliance with the Developer
Certificate of Origin is required:
https://libvirt.org/hacking.html#developer-certificate-of-origin
(You can reply to this thread with that line, no need to resend the
On a Friday in 2020, Peter Krempa wrote:
Clarify which bit is considered most significant in the bitmap and
resulting string. Also be explicit that it's a hex string.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 13 +
1 file changed, 9 insertions(+), 4 deletions(-)
diff
---
NEWS.rst | 8
1 file changed, 8 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index de46cac8c5..f6074d9fe8 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -27,6 +27,14 @@ v6.9.0 (unreleased)
v6.8.0 (2020-10-01)
===
+* **Security**
+
+ * qemu: double free in
On a Friday in 2020, Peter Krempa wrote:
Remove return value check from all callers.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 7 ++-
src/conf/checkpoint_conf.c | 3 +--
src/conf/domain_addr.c | 6 ++
src/conf/domain_conf.c | 12
Adds schema to validate the 'fmode' and 'dmode' attributes on a
'fileystem' node. Checks to ensure that the values are 1-3 octal
digits long.
Signed-off-by: Brian Turek
---
docs/schemas/domaincommon.rng | 16
1 file changed, 16 insertions(+)
diff --git
This second version of the patch incorporates Peter Krempa's feedback
by tweaking a few things in the code and, more importantly, splitting
up the singular large patch into smaller patches.
Brian Turek (4):
qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE
qemu: add support for 'fmode' and
Adds documentation for QEMU 9pfs 'fmode' and 'dmode' options.
Signed-off-by: Brian Turek
---
docs/formatdomain.rst | 12
1 file changed, 12 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index f3cf9e1fb3..88d836da08 100644
--- a/docs/formatdomain.rst
+++
Expose QEMU's 9pfs 'fmode' and 'dmode' options via attributes on the
'filesystem' node in the domain XML. These options control the creation
mode of files and directories, respectively, when using
accessmode=mapped. QEMU defaults to creating files with mode 600 and
directories with mode 700.
The QEMU 9pfs 'fmode' and 'dmode' options exists since QEMU 2.10. Probe
QEMU's command line set to check whether these options are really
available, and if yes, enable this new QEMU_CAPS_FSDEV_CREATEMODE
capability on libvirt side.
Signed-off-by: Brian Turek
---
src/qemu/qemu_capabilities.c
On a Friday in 2020, Peter Krempa wrote:
It can be replaced by virBitmapNew(0).
Signed-off-by: Peter Krempa
---
src/conf/numa_conf.c | 2 +-
src/libvirt_private.syms | 1 -
src/util/virbitmap.c | 16 +---
src/util/virbitmap.h | 1 -
src/util/virhostcpu.c| 4 ++--
On a Friday in 2020, Peter Krempa wrote:
Signed-off-by: Peter Krempa
---
src/qemu/qemu_slirp.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
Description: PGP signature
On a Friday in 2020, Peter Krempa wrote:
We now always return a valid pointer or crash so the return value
doesn't need to be checked.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Ján Tomko
Jano
signature.asc
On a Friday in 2020, Peter Krempa wrote:
We no longer report any errors so all callers can be replaced by
virBitmapNew. Additionally virBitmapNEw can't return NULL now so error
s/NEw/New/
handling is not necessary.
Signed-off-by: Peter Krempa
---
src/libvirt_private.syms | 1 -
On a Friday in 2020, Peter Krempa wrote:
Test an empty bitmap including it's extension via the self-expanding
APIs and and a "0" and "" strings when converting the string back and
forth.
Signed-off-by: Peter Krempa
---
tests/virbitmaptest.c | 35 ++-
1 file
On a Friday in 2020, Peter Krempa wrote:
Modify the condition which would make virBitmapNewQuiet fail to possibly
overallocate by 1 rather than failing.
Signed-off-by: Peter Krempa
---
src/util/virbitmap.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
Reviewed-by: Ján
On 10/2/20 12:36 PM, Pavel Hrdina wrote:
GLib implementation of g_dbus_connection_call_sync() calls
g_variant_ref_sink() on the passed @parameters to make sure they have
proper reference. If the original reference is floating the
g_dbus_connection_call_sync() consumes it, but if it's normal
On 10/2/20 10:57 AM, Peter Krempa wrote:
Note that this applies on top of the recent bitmap refactors
Peter Krempa (20):
qemu: migration_cookie: Extract parsing/validation of mandatory
features
qemuMigrationCookieXMLParse: Switch to single-purpose temporary
variables
GLib implementation of g_dbus_connection_call_sync() calls
g_variant_ref_sink() on the passed @parameters to make sure they have
proper reference. If the original reference is floating the
g_dbus_connection_call_sync() consumes it, but if it's normal reference
it will just add another one.
Our
On 10/2/20 4:11 AM, Michal Prívozník wrote:
On 10/1/20 7:52 PM, Cole Robinson wrote:
I'm seeing failures building libvirt 6.8.0 rpm on fedora 32, 33, and
rawhide. virsystemdtest is segfaulting on ppc64.
https://kojipkgs.fedoraproject.org//work/tasks/5494/52595494/build.log
Ah, I can
On Fri, Oct 02, 2020 at 12:04:21PM +0200, Michal Prívozník wrote:
> On 10/2/20 11:52 AM, Pavel Hrdina wrote:
> > On Fri, Oct 02, 2020 at 11:22:06AM +0200, Michal Privoznik wrote:
> > > The virGDBusCallMethod() and virGDBusCallMethodWithFD() are
> > > simple wrappers over
On 10/2/20 11:52 AM, Pavel Hrdina wrote:
On Fri, Oct 02, 2020 at 11:22:06AM +0200, Michal Privoznik wrote:
The virGDBusCallMethod() and virGDBusCallMethodWithFD() are
simple wrappers over g_dbus_connection_call_sync() and
g_dbus_connection_call_with_unix_fd_list_sync() respectively. The
On Fri, Oct 02, 2020 at 11:22:09AM +0200, Michal Privoznik wrote:
> The @checkMACAddress string is allocated in
> virVMXGetConfigString() but never freed.
>
> Signed-off-by: Michal Privoznik
> ---
> src/vmx/vmx.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Pavel Hrdina
On Fri, Oct 02, 2020 at 11:22:08AM +0200, Michal Privoznik wrote:
> In our wrapper of g_dbus_connection_call_sync() in
> virfirewalltest a string is duplicated and added onto a
> virStringList. This leads to a memory leak because
> virStringListAdd() duplicates the string itself.
>
>
On Fri, Oct 02, 2020 at 11:22:07AM +0200, Michal Privoznik wrote:
> With us switching to glib more and more it is easy to get things
> wrong (as can be seen in the previous commit). Set G_DEBUG
> variable to "fatal-warnings" which causes GLib to abort the
> program at the first call to g_warning()
On Fri, Oct 02, 2020 at 11:22:06AM +0200, Michal Privoznik wrote:
> The virGDBusCallMethod() and virGDBusCallMethodWithFD() are
> simple wrappers over g_dbus_connection_call_sync() and
> g_dbus_connection_call_with_unix_fd_list_sync() respectively. The
> documentation to these function states that
In our wrapper of g_dbus_connection_call_sync() in
virfirewalltest a string is duplicated and added onto a
virStringList. This leads to a memory leak because
virStringListAdd() duplicates the string itself.
Signed-off-by: Michal Privoznik
---
tests/virfirewalltest.c | 2 +-
1 file changed, 1
The @checkMACAddress string is allocated in
virVMXGetConfigString() but never freed.
Signed-off-by: Michal Privoznik
---
src/vmx/vmx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 4b1b04c6e1..9894d5c0ce 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@
Signed-off-by: Michal Privoznik
---
NEWS.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 7663cf4208..6c237dbba8 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -17,6 +17,12 @@ v6.9.0 (unreleased)
* **Bug fixes**
+ * lib: Don't unref message passed to
The first patch fixes issue raised by Cole here:
https://www.redhat.com/archives/libvir-list/2020-October/msg00037.html
The second one sets the environment variable which will cause our tests
fail should we run into similar problem. To see it in action just switch
order with patch 1/5 and
With us switching to glib more and more it is easy to get things
wrong (as can be seen in the previous commit). Set G_DEBUG
variable to "fatal-warnings" which causes GLib to abort the
program at the first call to g_warning() or g_critical().
Signed-off-by: Michal Privoznik
---
tests/meson.build
The virGDBusCallMethod() and virGDBusCallMethodWithFD() are
simple wrappers over g_dbus_connection_call_sync() and
g_dbus_connection_call_with_unix_fd_list_sync() respectively. The
documentation to these function states that passed parameters
(@message in our case) is consumed for 'convenient'
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index a1ef3d2b12..93d91b8a1c 100644
--- a/src/qemu/qemu_migration_cookie.c
+++
Previous refactors allow us to plainly replace all VIR_FREE by g_free to
finish the modernization of the file.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 34
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git
Restructure the control-flow a bit using an temporary variable to avoid
the need to use VIR_FREE.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c
Use modern allocators, automatic memory feeing, and decrease the scope
of some variables to remove the 'error' label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 27 ---
1 file changed, 8 insertions(+), 19 deletions(-)
diff --git
Move the code into 'qemuMigrationCookieNBDXMLFormat' and use modern XML
formatting code patterns.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 41 +---
1 file changed, 22 insertions(+), 19 deletions(-)
diff --git
Now it only returns -1 so we can do that directly.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 39 +++-
1 file changed, 18 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index
Use modern memory handling approach to simplify the code.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index
Switch to the two buffer approach to simplify the logic for terminating
the element.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 21 ++---
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c
Use modern allocators, automatic memory feeing, and decrease the scope
of some variables to remove the 'error' and 'cleanup' labels.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 31 ++-
1 file changed, 10 insertions(+), 21 deletions(-)
diff
Use automatic memory freeing to get rid of the 'error' label. Since the
'tmp' variable was used only in one instance, rename it appropriately.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 31 +++
1 file changed, 11 insertions(+), 20 deletions(-)
Use modern memory handling approach to simplify the code.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index
Note that this applies on top of the recent bitmap refactors
Peter Krempa (20):
qemu: migration_cookie: Extract parsing/validation of mandatory
features
qemuMigrationCookieXMLParse: Switch to single-purpose temporary
variables
qemuMigrationCookieXMLParse: Check domain element count
Make sure that 'virXPathNodeSet' returns '1' as the only expected value
rather than relying on the fact that the previous check for the number
of elements ensures success of the subsequent call.
The error message no longer mentions the number of elements in
the cookie, but this is a very
Use modern allocators, automatic memory feeing, and decrease the scope
of some variables to remove the 'cleanup' label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 31 +--
1 file changed, 9 insertions(+), 22 deletions(-)
diff --git
Most of our functions report errors so there's no need to mention it
here again.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index
Use 'virXMLFormatElement' both for formating the whole element
but also for formatting the subelements. This alows to
remove the crazy logic which was determining which element was already
formatted.
Additional simplification is achieved by switching to skipping the loop
using 'continue' rather
Switch to automatic memory cleaning, use g_new0 for allocation and get
rid of the 'error' label.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 21 ++---
1 file changed, 6 insertions(+), 15 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c
Register the the cleanup functions for 'qemuMigrationCookieGraphics',
'qemuMigrationCookieNetwork', 'qemuMigrationCookieNBD', and
'qemuMigrationCookieCaps'.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 9 +
1 file changed, 9 insertions(+)
diff --git
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_cookie.c
index 9b1268833a..a9dd2b9323 100644
--- a/src/qemu/qemu_migration_cookie.c
+++
Don't reuse 'tmp' over and over, but switch to single use automaticaly
freed variables instead.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 32 ++--
1 file changed, 14 insertions(+), 18 deletions(-)
diff --git
Move the code into 'qemuMigrationCookieXMLParseMandatoryFeatures' to
simplify 'qemuMigrationCookieXMLParse'.
Signed-off-by: Peter Krempa
---
src/qemu/qemu_migration_cookie.c | 77 +++-
1 file changed, 45 insertions(+), 32 deletions(-)
diff --git
Note that this applies on top of my previous series dealing with
bitmaps.
Peter Krempa (6):
virBitmapNewCopy: Reimplement bitmap copying to prevent failure
Don't check return value of virBitmapNewCopy
Use 'virBitmapNewCopy' instead of 'virBitmapCopy'
util: virbitmap: Remove virBitmapCopy
If we use g_new0 there's no need for the 'cleanup' label as there's
nothing to fail after the allocation.
Signed-off-by: Peter Krempa
---
src/conf/domain_conf.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index
The function will not fail any more.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 3 +--
src/conf/domain_conf.c | 7 +--
src/conf/numa_conf.c | 4 ++--
src/qemu/qemu_driver.c | 13 +++--
src/qemu/qemu_hotplug.c | 3
There are only 3 places using the function. Two can use virBitmapNewCopy
directly. In case of the qemu capabilities code we need to free the old
bitmap first.
Signed-off-by: Peter Krempa
---
src/conf/capabilities.c | 3 +--
src/qemu/qemu_capabilities.c | 3 ++-
src/util/virresctrl.c
1 - 100 of 135 matches
Mail list logo