[libvirt] [PATCH] build: fix testsuite building under cygwin
by Eric Blake
Similar to commit 8f34f19.
* tests/Makefile.am (virnetserverclienttest_CFLAGS): Add XDR_CFLAGS.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule.
tests/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 777758f..1a7ff4b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -639,6 +639,7 @@ virnetsockettest_LDADD = $(LDADDS)
virnetserverclienttest_SOURCES = \
virnetserverclienttest.c \
testutils.h testutils.c
+virnetserverclienttest_CFLAGS = $(XDR_CFLAGS) $(AM_CFLAGS)
virnetserverclienttest_LDADD = $(LDADDS)
virnetserverclientmock_la_SOURCES = \
--
1.8.3.1
11 years
[libvirt] [PATCH] rpc: Increase bound limit for virDomainGetJobStats
by Jiri Denemark
https://bugzilla.redhat.com/show_bug.cgi?id=1012818
Commit 6d7d0b1869ed293e3208d11f375cecea0129dfc5 (in 1.1.2) added bounds
checking to virDomainGetJobStats. But even at that time the API was able
to return 20 parameters while the limit was set to 16.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/remote/remote_protocol.x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 8d17bad..810eeca 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -230,7 +230,7 @@ const REMOTE_NODE_MEMORY_PARAMETERS_MAX = 64;
const REMOTE_DOMAIN_MIGRATE_PARAM_LIST_MAX = 64;
/* Upper limit on number of job stats */
-const REMOTE_DOMAIN_JOB_STATS_MAX = 16;
+const REMOTE_DOMAIN_JOB_STATS_MAX = 64;
/* Upper limit on number of CPU models */
const REMOTE_CONNECT_CPU_MODELS_MAX = 8192;
--
1.8.3.2
11 years
[libvirt] [PATCH] qemu_migrate: Fix assign the same port when migrating concurrently
by Wangyufei (A)
From: WangYufei <james.wangyufei(a)huawei.com>
Date: Fri, 27 Sep 2013 11:53:57 +0800
Subject: [PATCH] qemu_migrate: Fix assign the same port when migrating concurrently
When we migrate vms concurrently, there's a chance that libvirtd on destination assign the same port for different migrations, which will lead to migration failed during migration prepare phase on destination. So we change the port increase to atomic operation to solve the problem.
Signed-off-by: WangYufei <james.wangyufei(a)huawei.com>
---
src/qemu/qemu_migration.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 3a1aab7..0f496f4 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -57,6 +57,7 @@
#include "virhook.h"
#include "virstring.h"
#include "virtypedparam.h"
+#include "viratomic.h"
#define VIR_FROM_THIS VIR_FROM_QEMU
@@ -2521,7 +2522,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
* to be a correct hostname which refers to the target machine).
*/
if (uri_in == NULL) {
- this_port = QEMUD_MIGRATION_FIRST_PORT + port++;
+ this_port = QEMUD_MIGRATION_FIRST_PORT + virAtomicIntInc(&port);
if (port == QEMUD_MIGRATION_NUM_PORTS) port = 0;
/* Get hostname */
@@ -2578,7 +2579,7 @@ qemuMigrationPrepareDirect(virQEMUDriverPtr driver,
if (uri->port == 0) {
/* Generate a port */
- this_port = QEMUD_MIGRATION_FIRST_PORT + port++;
+ this_port = QEMUD_MIGRATION_FIRST_PORT + virAtomicIntInc(&port);
if (port == QEMUD_MIGRATION_NUM_PORTS)
port = 0;
--
1.7.3.1.msysgit.0
Best Regards,
-WangYufei
11 years
[libvirt] [libvirt-designer 1/2] Fix typo in error message
by Christophe Fergeau
---
Pushed under the trivial rule
libvirt-designer/libvirt-designer-main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libvirt-designer/libvirt-designer-main.h b/libvirt-designer/libvirt-designer-main.h
index 5e82f8a..9341754 100644
--- a/libvirt-designer/libvirt-designer-main.h
+++ b/libvirt-designer/libvirt-designer-main.h
@@ -21,7 +21,7 @@
*/
#if !defined(__LIBVIRT_DESIGNER_H__) && !defined(LIBVIRT_DESIGNER_BUILD)
-#error "Only <libvirt-gdesigner/libvirt-gdesigner.h> can be included directly."
+#error "Only <libvirt-designer/libvirt-designer.h> can be included directly."
#endif
#include <osinfo/osinfo.h>
--
1.8.3.1
11 years
[libvirt] [PATCH]LXC: fix a comment typo in lxc_controller.c
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
LXC: fix a comment typo in lxc_controller.c
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/lxc/lxc_controller.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index ed73ab0..636cf6e 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -2011,7 +2011,7 @@ virLXCControllerEventSend(virLXCControllerPtr ctrl,
virNetMessagePtr msg;
if (!ctrl->client) {
- VIR_WARN("Dropping event %d becuase libvirtd is not connected", procnr);
+ VIR_WARN("Dropping event %d because libvirtd is not connected", procnr);
return;
}
--
1.8.2.1
11 years
[libvirt] [PATCH] build: fix use of rpc.h on cygwin
by Eric Blake
Caused by commit 012c25e8 splitting out a convenience library.
CC libvirtd_conf_la-libvirtd-config.lo
In file included from ../src/rpc/virnetmessage.h:24:0,
from ../src/rpc/virnetserverprogram.h:27,
from ../src/rpc/virnetserver.h:32,
from libvirtd-config.c:31:
../src/rpc/virnetprotocol.h:9:21: fatal error: rpc/rpc.h: No such file
or directory
* daemon/Makefile.am (libvirtd_conf_la_CFLAGS): Add XDR_CFLAGS.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Pushing under the build-breaker rule (well, I will once libvirt.org
is responsive again - it's been having problems with the git server
today)
daemon/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index eb58de9..46c766c 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -100,6 +100,7 @@ noinst_LTLIBRARIES = libvirtd_conf.la
libvirtd_conf_la_SOURCES = $(LIBVIRTD_CONF_SOURCES)
libvirtd_conf_la_CFLAGS = \
$(LIBXML_CFLAGS) \
+ $(XDR_CFLAGS) \
$(WARN_CFLAGS) $(PIE_CFLAGS) \
$(COVERAGE_CFLAGS) \
$(NULL)
--
1.8.3.1
11 years
[libvirt] [PATCH]LXC: free dst before lxcDomainAttachDeviceDiskLive return
by Chen Hanxiao
From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
free dst before lxcDomainAttachDeviceDiskLive return
Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
---
src/lxc/lxc_driver.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 9c58f67..7906ad1 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -3053,6 +3053,7 @@ cleanup:
virDomainAuditDisk(vm, NULL, def->src, "attach", ret == 0);
if (dst && created && ret < 0)
unlink(dst);
+ VIR_FREE(dst);
return ret;
}
--
1.8.2.1
11 years
[libvirt] [PATCH 0/3] qemu: Hotplug SCSI controllers/hostdevs
by Eric Farman
Today, hotplug of a SCSI hostdev relies on the presence of an existing
SCSI controller, which can be defined in the initial domain XML. Hotplug
of a SCSI controller relies on the presence of a PCI bus, which does not
work in all environments.
These patches correct this behavior, in order to allow hotplug (and unplug)
work without incident.
Reviewed-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
Eric Farman (3):
qemu: Rename controller hotplug functions to not be PCI-specific
qemu: Separate calls based on controller bus type
qemu: Auto-generate controller for hotplugged hostdev
src/qemu/qemu_driver.c | 4 +--
src/qemu/qemu_hotplug.c | 62 ++++++++++++++++++++++++++++++++---------------
src/qemu/qemu_hotplug.h | 12 ++++-----
3 files changed, 50 insertions(+), 28 deletions(-)
--
1.7.9.5
11 years
[libvirt] [PATCH] util: recognize SMB filesystems as shared
by Laine Stump
This should resolve:
https://bugzilla.redhat.com/show_bug.cgi?id=1012085
libvirt previously recognized NFS, GFS2, OCFS2, and AFS filesystems as
"shared", and thus eligible for exceptions to certain rules/actions
about chowning image files before handing them off to a guest. This
patch widens the definition of "shared filesystem" to include the SMB
filesystem (sometimes called CIFS, or "Windows file sharing").
---
src/util/virstoragefile.c | 9 ++++++++-
src/util/virstoragefile.h | 1 +
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 0b9cec3..ed43b2b 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -1241,6 +1241,9 @@ cleanup:
# ifndef AFS_FS_MAGIC
# define AFS_FS_MAGIC 0x6B414653
# endif
+# ifndef SMB_SUPER_MAGIC
+# define SMB_SUPER_MAGIC 0x517B
+# endif
int virStorageFileIsSharedFSType(const char *path,
@@ -1304,6 +1307,9 @@ int virStorageFileIsSharedFSType(const char *path,
if ((fstypes & VIR_STORAGE_FILE_SHFS_AFS) &&
(sb.f_type == AFS_FS_MAGIC))
return 1;
+ if ((fstypes & VIR_STORAGE_FILE_SHFS_SMB) &&
+ (sb.f_type == SMB_SUPER_MAGIC))
+ return 1;
return 0;
}
@@ -1322,7 +1328,8 @@ int virStorageFileIsSharedFS(const char *path)
VIR_STORAGE_FILE_SHFS_NFS |
VIR_STORAGE_FILE_SHFS_GFS2 |
VIR_STORAGE_FILE_SHFS_OCFS |
- VIR_STORAGE_FILE_SHFS_AFS);
+ VIR_STORAGE_FILE_SHFS_AFS |
+ VIR_STORAGE_FILE_SHFS_SMB);
}
int virStorageFileIsClusterFS(const char *path)
diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h
index 1f89839..9c07212 100644
--- a/src/util/virstoragefile.h
+++ b/src/util/virstoragefile.h
@@ -112,6 +112,7 @@ enum {
VIR_STORAGE_FILE_SHFS_GFS2 = (1 << 1),
VIR_STORAGE_FILE_SHFS_OCFS = (1 << 2),
VIR_STORAGE_FILE_SHFS_AFS = (1 << 3),
+ VIR_STORAGE_FILE_SHFS_SMB = (1 << 4),
};
int virStorageFileIsSharedFS(const char *path);
--
1.7.11.7
11 years