Greate thanks for your suggestions, Daniel. I'll fix that and update my
patchset later.
BR,
Hao
On 2020/10/28 3:14, Daniel Henrique Barboza wrote:
>
> This patch does not compile/test successfully in my env. There are
> at least 2 things going wrong here:
>
>
Commit 53aec799fa31 introduced the function udevGetVDPACharDev(),
which scans a directory using virDirOpenIfExists() and
virDirRead(). It unfortunately forgets to close the DIR* when it is
finished with it. This patch fixes that omission.
Signed-off-by: Laine Stump
---
src/node_device/node_devic
After converting all DIR* to g_autoptr(DIR), many cleanup: labels
ended up just having "return ret", and every place that set ret would
just immediately goto cleanup. Remove the cleanup label and its
return, and just return the set value immediately, thus eliminating
the need for the return variabl
Once the DIR* in virPCIGetName() was made g_autoptr, the cleanup:
label just had a "return ret;", but the rest of the function was more
compilcated than it needed to be, doing funky things with the value of
ret inside multi-level conditionals and a while loop that might exit
early via a break with
Signed-off-by: Laine Stump
---
src/util/virfile.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/util/virfile.h b/src/util/virfile.h
index 6fde4f88ca..6973fbd54a 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -271,6 +271,7 @@ int virDirRead(DIR *dirp, struct dirent **ent, co
In order to make a usable g_autoptr(DIR), we need to have a close
function that is a NOP when the pointer is NULL, but takes a simple
DIR*. But virDirClose() (candidate to be the g_autoptr cleanup
function) currently takes a DIR**, not DIR*. It does this so that it
can clear the pointer, thus makin
Since every single use of DIR* was converted to use g_autoptr, this
function is not currently needed. Even if someone comes up with a
usage for a non-g_autoptr DIR* in the future, they can just use
virDirClose(), since there is no longer a semantic difference between
the two (VIR_DIR_CLOSE() previo
In all uses of VIR_DIR_CLOSE() except one, the DIR* is never
referenced after closing all the way until it goes out of
scope. virCapabilitiesInitCaches(), however, reuses the same DIR* over
and over in a loop, but due to having many error conditions that
result in a goto out of the loop, it's not w
All of these conversions are trivial - VIR_DIR_CLOSE() (aka
virDirClose()) is called only once on the DIR*, and it happens just
before going out of scope.
Signed-off-by: Laine Stump
---
src/bhyve/bhyve_capabilities.c | 3 +--
src/conf/virdomainobjlist.c | 3 +--
src/conf/virnetw
This use of DIR* was re-using the same function-scope DIR* each time
through a for loop, and due to multiple error gotos in the loop, it
needed to have the scope of the DIR* reduced to just the loop at the
same time as switching to g_autoptr. That's what this patch does.
Signed-off-by: Laine Stump
VIR_DIR_CLOSE(dir) is called in the middle of
virStorageBackendRefreshLocal(), which is okay, but redundant - there
is no reference to dir between that call and the end of the function,
where VIR_DIR_CLOSE() is called again. Remove the extra call in the
middle to simplify the function and make the
This will make it easier to review upcoming patches that use g_autoptr
to auto-close all DIRs.
Signed-off-by: Laine Stump
---
src/qemu/qemu_interop_config.c | 2 +-
src/security/security_selinux.c | 6 ++
src/util/virdevmapper.c | 2 +-
src/util/virfile.c | 3 +--
tests
This will make the trivial nature of a conversion to g_autoptr (in a
later patch) more obvious.
Signed-off-by: Laine Stump
---
tools/virt-host-validate-common.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/virt-host-validate-common.c
b/tools/virt-host-validate-com
DIR *dh is being re-used each time through the for loop of this
function, so it must be closed and then re-opened, which means we
can't convert it to g_autoptr. By moving the definition of dh inside
the for loop, we make it possible to trivially convert to g_autoptr
(which will happen in a subseque
I don't even remember why I started looking at this. I think that
again I was considering changing some function, and making the DIR* in
that function autoclose was a prerequisite for a reasonably clean
addition to the function. I eventually gave up on the other plan
(probably because it was a bad
Since 'block-export-add' is new to 5.2, we can still tweak the
interface; there, allowing 'bitmaps':['str'] is nicer than
'bitmap':'str'. This wires up the qapi and qemu-nbd changes to permit
passing multiple bitmaps as distinct metadata contexts that the NBD
client may request, but the actual sup
On 10/27/20 9:47 AM, Hao Wang wrote:
Introduce DomainGetDirtyRateInfo API for domain's memory dirty rate
calculation and query.
Signed-off-by: Hao Wang
Signed-off-by: Zhou Yimin
Reviewed-by: Chuan Zheng
---
This patch does not compile/test successfully in my env. There are
at least 2 th
On 10/27/20 5:39 PM, Laine Stump wrote:
Commit f7114e61db removed these lines as being "old and
obsolete". cscope may be old, but it is still very much useful and
used (i.e. *not* obsolete), and having the files show up as "Untracked
files:" every time git status is run is annoying.
Signed-off-b
Commit f7114e61db removed these lines as being "old and
obsolete". cscope may be old, but it is still very much useful and
used (i.e. *not* obsolete), and having the files show up as "Untracked
files:" every time git status is run is annoying.
Signed-off-by: Laine Stump
---
I'm not sure why I di
Function to compare CPU on 64-bits PowerPC is ignoring the flag to avoid failure
in case of CPUs (host and guest) are incompatible. Basically, the function is
returning -1 even if it is set to continue.
Signed-off-by: Julio Faracco
---
src/cpu/cpu_ppc64.c | 8
1 file changed, 4 insertio
Hi Jano,
Your suggestion makes more sense.
Let me send a V2 then.
Tks :-)
--
Julio Cesar Faracco
Em ter., 27 de out. de 2020 às 12:24, Ján Tomko escreveu:
>
> On a Tuesday in 2020, Julio Faracco wrote:
> >Function to compare CPU on 64-bit PowerPC is ignoring the flag to avoid
> >failure in cas
On a Tuesday in 2020, Julio Faracco wrote:
Function to compare CPU on 64-bit PowerPC is ignoring the flag to avoid
failure in case of CPUs (host and guest) are incompatible. Basically, the
function is returning -1 even if it is set to continue.
Signed-off-by: Julio Faracco
---
src/cpu/cpu_ppc64
27.10.2020 08:05, Eric Blake wrote:
Since 'block-export-add' is new to 5.2, we can still tweak the
interface; there, allowing 'bitmaps':['str'] is nicer than
'bitmap':'str'. This wires up the qapi and qemu-nbd changes to permit
passing multiple bitmaps as distinct metadata contexts that the NBD
Function to compare CPU on 64-bit PowerPC is ignoring the flag to avoid
failure in case of CPUs (host and guest) are incompatible. Basically, the
function is returning -1 even if it is set to continue.
Signed-off-by: Julio Faracco
---
src/cpu/cpu_ppc64.c | 4 ++--
1 file changed, 2 insertions(
On Tue, Oct 27, 2020 at 13:59:17 +0100, Martin Kletzander wrote:
> The cpu mask was free()'d immediately on any error and at the end of the
> function, where it was expected that it would either error out and return or
> goto another allocation if the code was to fail. However since commit
> 9514e
On Tue, 2020-10-27 at 13:52 +0100, Boris Fiuczynski wrote:
> Signed-off-by: Boris Fiuczynski
> ---
> NEWS.rst | 6 ++
> 1 file changed, 6 insertions(+)
Reviewed-by: Andrea Bolognani
and pushed.
--
Andrea Bolognani / Red Hat / Virtualization
On Tue, 27 Oct 2020 13:52:04 +0100
Boris Fiuczynski wrote:
> Signed-off-by: Boris Fiuczynski
> ---
> NEWS.rst | 6 ++
> 1 file changed, 6 insertions(+)
>
> diff --git a/NEWS.rst b/NEWS.rst
> index 5bd8ed1c91..2fef3f706c 100644
> --- a/NEWS.rst
> +++ b/NEWS.rst
> @@ -13,6 +13,12 @@ v6.9.0 (
Glib's hash table provides basically the same functionality as our hash
table.
In most cases the only thing that remains in the virHash* wrappers is
NULL-checks of '@table' argument as glib's hash functions don't tolerate
NULL.
In case of iterators, we adapt the existing API of iterators to glibs
On Tue, 2020-10-27 at 14:05 +0100, Andrea Bolognani wrote:
> I'm not convinced reverting this was the right call.
>
> The way RPM conditional macros work is that, if you have
>
> %{!?macro:value}
>
> that will expand to 'value' if 'macro' is *not* defined, and to
> nothing otherwise. So if you
On Tue, 2020-10-27 at 11:07 +0100, Michal Privoznik wrote:
> On 10/26/20 10:53 PM, Neal Gompa wrote:
> > As it turns out, the rather complicated structure that is
> > currently used for enabling or disabling features in the libvirt
> > build does not cleanly map well to RPM's bcond feature.
> >
>
The cpu mask was free()'d immediately on any error and at the end of the
function, where it was expected that it would either error out and return or
goto another allocation if the code was to fail. However since commit
9514e24984ee the error path did not return in one new case which caused
double
Signed-off-by: Boris Fiuczynski
---
NEWS.rst | 6 ++
1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst
index 5bd8ed1c91..2fef3f706c 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -13,6 +13,12 @@ v6.9.0 (unreleased)
* **New features**
+ * nodedev: Add support for channel subsyst
Introduce DomainGetDirtyRateInfo API for domain's memory dirty rate
calculation and query.
Signed-off-by: Hao Wang
Signed-off-by: Zhou Yimin
Reviewed-by: Chuan Zheng
---
include/libvirt/libvirt-domain.h | 5
src/driver-hypervisor.h | 7 +
src/libvirt-domain.c |
V2 -> V3:
reorganize patchset to fix compile warning
V1 -> V2:
replace QEMU_JOB_ASYNC with QEMU_JOB_QUERY
Sometimes domain's memory dirty rate is expected by user in order to
decide whether it's proper to be migrated out or not.
We have already completed the QEMU part of the capability:
https:/
Implement qemuDomainGetDirtyRateInfo:
using flags to control behaviors -- calculate and/or query dirtyrate.
Signed-off-by: Hao Wang
Reviewed-by: Chuan Zheng
---
include/libvirt/libvirt-domain.h | 11 +++
src/qemu/qemu_driver.c | 51 ++--
2 files changed
Implement qemuMonitorJSONExtractDirtyRateInfo to deal with the return from
qmp "query-dirty-rate", and store them in virDomainDirtyRateInfo.
Signed-off-by: Hao Wang
Reviewed-by: Chuan Zheng
---
include/libvirt/libvirt-domain.h | 16 +
src/qemu/qemu_monitor_json.c | 58 ++
Implement qemuDomainCalculateDirtyRate which calculates domain's memory
dirty rate calling qmp "calc-dirty-rate".
Signed-off-by: Hao Wang
Signed-off-by: Zhou Yimin
Reviewed-by: Chuan Zheng
---
src/qemu/qemu_driver.c | 6 +-
src/qemu/qemu_migration.c| 28 +
Implement qemuDomainCalculateDirtyRate which calculates domain's memory
dirty rate calling qmp "calc-dirty-rate".
Signed-off-by: Hao Wang
Signed-off-by: Zhou Yimin
Reviewed-by: Chuan Zheng
---
src/qemu/qemu_driver.c | 6 +-
src/qemu/qemu_migration.c| 31 +
Introduce virDomainDirtyRateInfo structure used for domain's memory dirty rate
query.
Signed-off-by: Hao Wang
Reviewed-by: Chuan Zheng
---
include/libvirt/libvirt-domain.h | 24
1 file changed, 24 insertions(+)
diff --git a/include/libvirt/libvirt-domain.h b/include/l
Signed-off-by: Hao Wang
Signed-off-by: Zhou Yimin
Reviewed-by: Chuan Zheng
---
tools/virsh-domain.c | 112 +++
1 file changed, 112 insertions(+)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index ef347585e8..c1361ea6a9 100644
--- a/tools/virs
On Tue, Oct 27, 2020 at 00:05:49 -0500, Eric Blake wrote:
> Since 'block-export-add' is new to 5.2, we can still tweak the
> interface; there, allowing 'bitmaps':['str'] is nicer than
> 'bitmap':'str'. This wires up the qapi and qemu-nbd changes to permit
> passing multiple bitmaps as distinct met
On Tue, Oct 27, 2020 at 01:09:38PM +0100, Peter Krempa wrote:
> On Tue, Oct 27, 2020 at 10:04:33 +, Daniel Berrange wrote:
> > On Tue, Oct 27, 2020 at 10:53:12AM +0100, Peter Krempa wrote:
> > > On Mon, Oct 26, 2020 at 16:08:34 +, Daniel Berrange wrote:
> > > > On Mon, Oct 26, 2020 at 04:45
On Tue, Oct 27, 2020 at 10:04:33 +, Daniel Berrange wrote:
> On Tue, Oct 27, 2020 at 10:53:12AM +0100, Peter Krempa wrote:
> > On Mon, Oct 26, 2020 at 16:08:34 +, Daniel Berrange wrote:
> > > On Mon, Oct 26, 2020 at 04:45:50PM +0100, Peter Krempa wrote:
> > > > Glib's hash table provides ba
On Tue, Oct 27, 2020 at 6:24 AM Michal Privoznik wrote:
>
> On 10/26/20 11:08 PM, Neal Gompa wrote:
> > Contemporary versions of Fedora automatically set SOURCE_DATE_EPOCH
> > based on the changelog entry date stamp. In scenarios where it already
> > is defined, we do not want to redefine it.
> >
On 10/22/20 6:38 PM, Matt Coleman wrote:
Here's a draft GitLab MR if you'd prefer to review the changes there:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/3/diffs
Matt Coleman (6):
hyperv: reformat WQL query strings
hyperv: remove duplicate function hypervGetVSSDFromUUID()
On 10/26/20 11:08 PM, Neal Gompa wrote:
Contemporary versions of Fedora automatically set SOURCE_DATE_EPOCH
based on the changelog entry date stamp. In scenarios where it already
is defined, we do not want to redefine it.
This part is okay.
Additionally, when building the libvirt package in
On 10/26/20 10:53 PM, Neal Gompa wrote:
As it turns out, the rather complicated structure that is
currently used for enabling or disabling features in the libvirt
build does not cleanly map well to RPM's bcond feature.
Consequently, we need these back in order to support trivially
activating the
On Tue, Oct 27, 2020 at 10:53:12AM +0100, Peter Krempa wrote:
> On Mon, Oct 26, 2020 at 16:08:34 +, Daniel Berrange wrote:
> > On Mon, Oct 26, 2020 at 04:45:50PM +0100, Peter Krempa wrote:
> > > Glib's hash table provides basically the same functionality as our hash
> > > table.
> > >
> > > In
On Mon, Oct 26, 2020 at 16:08:34 +, Daniel Berrange wrote:
> On Mon, Oct 26, 2020 at 04:45:50PM +0100, Peter Krempa wrote:
> > Glib's hash table provides basically the same functionality as our hash
> > table.
> >
> > In most cases the only thing that remains in the virHash* wrappers is
> > NU
On Tue, Oct 27, 2020 at 12:28:43AM +0100, Andrea Bolognani wrote:
> See patch 1 for details.
>
> Andrea Bolognani (2):
> rpc: Fix virt-ssh-helper detection
> news: Mention virt-ssh-helper detection fix
Reviewed-by: Daniel P. Berrangé
Regards,
Daniel
--
|: https://berrange.com -o-
On Mon, Sep 28, 2020 at 12:56:12PM +0300, Dmytro Linkin wrote:
> On Tue, Sep 22, 2020 at 08:31:15AM -0400, Laine Stump wrote:
> > On 8/28/20 6:53 AM, Dmytro Linkin wrote:
> > >Current virPCIGetNetName() logic is to get net device name by checking
> > >it's phys_port_id, if caller provide it, or by
51 matches
Mail list logo