[libvirt] [PATCH] vz: get rid of unused home state variable in private domain obj
by Nikolay Shirokovskiy
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy(a)virtuozzo.com>
---
src/vz/vz_sdk.c | 16 ----------------
src/vz/vz_utils.h | 1 -
2 files changed, 17 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 2275572..3fe17e0 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -447,7 +447,6 @@ prlsdkDomObjFreePrivate(void *p)
PrlHandle_Free(pdom->sdkdom);
PrlHandle_Free(pdom->cache.stats);
virCondDestroy(&pdom->cache.cond);
- VIR_FREE(pdom->home);
VIR_FREE(p);
};
@@ -1484,7 +1483,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom)
virDomainDefPtr def = NULL;
vzDomObjPtr pdom = NULL;
VIRTUAL_MACHINE_STATE domainState;
- char *home = NULL;
PRL_RESULT pret;
PRL_UINT32 ram;
@@ -1541,17 +1539,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom)
pret = PrlVmCfg_GetEnvId(sdkdom, &envId);
prlsdkCheckRetGoto(pret, error);
- if (!(home = prlsdkGetStringParamVar(PrlVmCfg_GetHomePath, sdkdom)))
- goto error;
-
- /* For VMs home is actually /directory/config.pvs */
- if (!IS_CT(def)) {
- /* Get rid of /config.pvs in path string */
- char *s = strrchr(home, '/');
- if (s)
- *s = '\0';
- }
-
pret = PrlVmCfg_GetAutoStart(sdkdom, &autostart);
prlsdkCheckRetGoto(pret, error);
if (autostart != PAO_VM_START_ON_LOAD &&
@@ -1588,8 +1575,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom)
virDomainDefFree(dom->def);
dom->def = def;
pdom->id = envId;
- VIR_FREE(pdom->home);
- pdom->home = home;
prlsdkConvertDomainState(domainState, envId, dom);
@@ -1607,7 +1592,6 @@ prlsdkLoadDomain(vzDriverPtr driver, virDomainObjPtr dom)
return 0;
error:
PrlHandle_Free(sdkdom);
- VIR_FREE(home);
virDomainDefFree(def);
return -1;
}
diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
index ba4d3c5..1e2ed30 100644
--- a/src/vz/vz_utils.h
+++ b/src/vz/vz_utils.h
@@ -103,7 +103,6 @@ typedef struct _vzCountersCache vzCountersCache;
struct vzDomObj {
int id;
- char *home;
PRL_HANDLE sdkdom;
vzCountersCache cache;
};
--
1.8.3.1
8 years, 6 months
[libvirt] [PATCH] check-spacing: fix error message
by Ján Tomko
The check for whitespace before comma or semicolon referred
to comma as colon.
---
build-aux/check-spacing.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Pushed as trivial.
diff --git a/build-aux/check-spacing.pl b/build-aux/check-spacing.pl
index f4fedbc..448acf2 100755
--- a/build-aux/check-spacing.pl
+++ b/build-aux/check-spacing.pl
@@ -138,7 +138,7 @@ foreach my $file (@ARGV) {
if ($data =~ /\s[;,]/) {
unless ($data =~ /\S; ; / ||
$data =~ /^\s+;/) {
- print "Whitespace before (semi)colon:\n";
+ print "Whitespace before semicolon or comma:\n";
print "$file:$.: $line";
$ret = 1;
}
--
2.7.3
8 years, 6 months
[libvirt] [PATCH 0/9] syntax-check: make spacing check faster
by Ján Tomko
Simplify some regexes to increase coverage and speed up the execution.
Reduces (git ls-files "*.c" | xargs build-aux/bracket-spacing.pl) by
half a second (from 1.9s to 1.33s), the effect on complete syntax-check
is only ~150 ms.
Ján Tomko (9):
vbox: reformat multi-line error reports
maint: remove whitespace from closing parentheses
Rename virAssertCmpInt to testAssertEq
Rename bracket-spacing.pl to check-spacing.pl
check-spacing: rewrite whitespace check before (semi)colon
check-spacing: rewrite regex for checking the closing parenthesis
check-spacing: simplify keyword spacing check
check-spacing: remove virAssertCmpInt exception
check-spacing: use non-capturing groups
build-aux/bracket-spacing.pl | 204 ------------------------------------------
build-aux/check-spacing.pl | 204 ++++++++++++++++++++++++++++++++++++++++++
cfg.mk | 6 +-
src/qemu/qemu_command.c | 3 +-
src/vbox/vbox_common.c | 8 +-
src/vbox/vbox_snapshot_conf.c | 68 +++++++-------
src/vz/vz_driver.c | 3 +-
src/vz/vz_sdk.c | 3 +-
tests/viratomictest.c | 52 +++++------
9 files changed, 274 insertions(+), 277 deletions(-)
delete mode 100755 build-aux/bracket-spacing.pl
create mode 100755 build-aux/check-spacing.pl
--
2.7.3
8 years, 6 months
[libvirt] [PATCH] maint: Switch to xz compressed PAX release archives
by Andrea Bolognani
This allows us to produce releases that are roughly a third in
size, have no limitation on path lenght, and are still readable
by all supported platforms.
---
And what better time to switch than the 2.0.0 release? :)
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 0114149..7d16e5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,7 +24,7 @@ AH_BOTTOM([#include <config-post.h>])
AC_CONFIG_MACRO_DIR([m4])
dnl Make automake keep quiet about wildcards & other GNUmake-isms; also keep
dnl quiet about the fact that we intentionally cater to automake 1.9
-AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-ustar subdir-objects])
+AM_INIT_AUTOMAKE([-Wno-portability -Wno-obsolete tar-pax no-dist-gzip dist-xz subdir-objects])
dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
dnl we don't really need the 'u' even in older toolchains. Then there is
dnl older libtool, which spelled it AR_FLAGS
--
2.5.5
8 years, 6 months
[libvirt] Bump tar format?
by Andrea Bolognani
Hi everyone,
commit cc3d52e[1] has apparently broken 'make dist' for at least some
platforms: Fedora 20 is fine[2], but both Fedora 21 and rawhide[3][4]
are currently failing. My laptop is running Fedora 22 and can make
dist just fine, which is of course very confusing.
The issue is caused by the following tar error:
tar: libvirt-1.2.18/tests/nodeinfodata/linux-deconfigured-cpus/ \
node/node0/cpu16/topology/core_siblings_list: \
link name is too long; not dumped
There seem to be basically two ways to solve the failure:
1. rename the test case, making it shorter;
2. bump tar format from ustar, which has limitations on the length
of file names, to posix/pax, which has no such limitations.
I'm not a fan of the former option because short names are usually very
opaque, see tests/nodeinfodata/linux-test[0-8] for some perfect
examples.
On the other hand, I'm not sure whether bumping the tar version would
affect portability in a significant way: the automake documentation[5]
reports that
this format is very young and should probably be restricted to
packages that target only very modern platforms
but the GNU tar documentation[6], while containing some warnings as
well, suggest that this format is going to become the default.
Any suggestions on how to proceed?
Cheers.
[1] https://www.redhat.com/archives/libvir-list/2015-July/msg00662.html
[2] https://ci.centos.org/view/libvirt-project/job/libvirt-daemon
-rpm/systems=libvirt-fedora-20/327/
[3] https://ci.centos.org/view/libvirt-project/job/libvirt-daemon
-rpm/systems=libvirt-fedora-21/327/
[4] https://ci.centos.org/view/libvirt-project/job/libvirt-daemon
-rpm/systems=libvirt-fedora-rawhide/327/
[5] https://www.gnu.org/software/automake/manual/html_node/List-of
-Automake-options.html
[6] http://www.gnu.org/software/tar/manual/html_chapter/tar_8.html
--
Andrea Bolognani
Software Engineer - Virtualization Team
8 years, 6 months
[libvirt] [PATCH] virHostCPUGetInfo: Fix build on non-Unix like systems
by Michal Privoznik
This function is plenty of ifdefs providing implementations for
Linux, *BSD and OS-X. However, if we are being build for any
other architecture, all that's left behind by preprocessor is
just a error reporting call and return of -1. In that case,
passed arguments are unused:
../../src/util/virhostcpu.c: In function 'virHostCPUGetInfo':
../../src/util/virhostcpu.c:966:33: error: unused parameter 'cpus' [-Werror=unused-parameter]
unsigned int *cpus,
^~~~
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/util/virhostcpu.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index 00c09cd..a481be0 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -963,12 +963,12 @@ virHostCPUParseMapLinux(int max_cpuid, const char *path)
int
virHostCPUGetInfo(virArch hostarch ATTRIBUTE_UNUSED,
- unsigned int *cpus,
- unsigned int *mhz,
- unsigned int *nodes,
- unsigned int *sockets,
- unsigned int *cores,
- unsigned int *threads)
+ unsigned int *cpus ATTRIBUTE_UNUSED,
+ unsigned int *mhz ATTRIBUTE_UNUSED,
+ unsigned int *nodes ATTRIBUTE_UNUSED,
+ unsigned int *sockets ATTRIBUTE_UNUSED,
+ unsigned int *cores ATTRIBUTE_UNUSED,
+ unsigned int *threads ATTRIBUTE_UNUSED)
{
#ifdef __linux__
int ret = -1;
--
2.8.4
8 years, 6 months
[libvirt] [PATCH 0/2] Speed up syntax-check
by Ján Tomko
Remove one inefficient regex not applicable to libvirt codebase
and join non-reentrant functions into a single regex to reduce
the time taken by the two slowest syntax-checks:
4.03 unmarked_diagnostics
4.03 vulnerable_makefile_CVE-2009-4029
4.03 size_of_brackets
4.03 spec_indentation
4.33 require_config_h_first
5.88 prohibit_nonreentrant
7.72 prohibit_undesirable_word_seq
This reduces the overall 'make -j9 syntax-check' time for me
from ~8s to ~4.5s.
Ján Tomko (2):
cfg.mk: override gnulib's undesirable_word_seq check
cfg.mk: use a single regex for all non-reentrant functions
Makefile.nonreentrant | 8 ++++++++
cfg.mk | 18 ++++++++----------
2 files changed, 16 insertions(+), 10 deletions(-)
--
2.7.3
8 years, 6 months
[libvirt] [PATCH] A word error about S3/S4 operations for guest
by sannyshao
---
docs/formatdomain.html.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 82b6aae..dd9f153 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1462,7 +1462,7 @@
<dl>
<dt><code>pm</code></dt>
<dd>These elements enable ('yes') or disable ('no') BIOS support
- for S3 (suspend-to-disk) and S4 (suspend-to-mem) ACPI sleep
+ for S3 (suspend-to-mem) and S4 (suspend-to-disk) ACPI sleep
states. If nothing is specified, then the hypervisor will be
left with its default value.</dd>
</dl>
--
1.8.3.1
8 years, 6 months
[libvirt] [RFC PATCH 0/4] Add new function about block backup
by Rudy Zhang
Add new function about block backup, it supports the drive-backup function
in qemu, it supports three modes: full, top, incremental.
How to use it? As usual, we must do the full backup at first, if it's
successfull, next time, we can do the incremental backup, because it has
the bitmap to trace the dirty io. The incermental backup is faster.
If backup fail at some time, we must do the full backup again, only in this
way, we can keep the backup data correctly.
Rudy Zhang (4):
Introduce virDomainBlockBackup API
qemu drive support block backup.
virsh: support blockbackup in virsh command
libvirt-test: libvirt test supports drive-backup
docs/apibuild.py | 3 +-
include/libvirt/libvirt-domain.h | 15 ++
src/conf/domain_conf.h | 12 ++
src/driver-hypervisor.h | 9 +
src/libvirt-domain.c | 56 ++++++
src/libvirt_public.syms | 5 +
src/qemu/qemu_blockjob.c | 2 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 5 +
src/qemu/qemu_driver.c | 197 +++++++++++++++++++++
src/qemu/qemu_monitor.c | 59 ++++++
src/qemu/qemu_monitor.h | 23 +++
src/qemu/qemu_monitor_json.c | 124 +++++++++++++
src/qemu/qemu_monitor_json.h | 23 +++
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 17 +-
src/remote_protocol-structs | 9 +
tests/qemucaps2xmldata/all_1.6.0-1.caps | 1 +
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps | 1 +
tools/virsh-domain.c | 149 ++++++++++++++++
20 files changed, 713 insertions(+), 2 deletions(-)
--
2.6.4
8 years, 6 months