[libvirt] [PATCH] Fix building virnetserverclientmock with MinGW
by Martin Kletzander
Signed-off-by: Pavel Fedin <p.fedin(a)samsung.com>
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
tests/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dc7daaa..e3ba12b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -931,6 +931,7 @@ virnetserverclientmock_la_SOURCES = \
virnetserverclientmock.c
virnetserverclientmock_la_CFLAGS = $(AM_CFLAGS)
virnetserverclientmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
+virnetserverclientmock_la_LDADDS = $(GNULIB_LIBS)
if WITH_GNUTLS
virnettlscontexttest_SOURCES = \
--
2.3.6
9 years, 8 months
[libvirt] [PATCH] util: fix memleak in virStorageSourceClear
by zhang bo
snapshot and configFile are not freed, free them.
Signed-off-by: Zhang Bo <oscar.zhangbo(a)huawei.com>
---
src/util/virstoragefile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 9507ca1..6c3017c 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2038,6 +2038,8 @@ virStorageSourceClear(virStorageSourcePtr def)
VIR_FREE(def->path);
VIR_FREE(def->volume);
+ VIR_FREE(def->snapshot);
+ VIR_FREE(def->configFile);
virStorageSourcePoolDefFree(def->srcpool);
VIR_FREE(def->driverName);
virBitmapFree(def->features);
--
1.7.12.4
9 years, 8 months
[libvirt] [PATCH] Cleanup srcdir usage
by Michal Privoznik
In a lot places we use path like this:
$(srcdir)/../src/....
when in fact it can be:
$(top_srcdir)/src/
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
daemon/Makefile.am | 12 ++++++------
docs/Makefile.am | 50 ++++++++++++++++++++++++------------------------
src/Makefile.am | 2 +-
tests/schematestutils.sh | 2 +-
4 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index bceaeb2..300b9a5 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -77,21 +77,21 @@ REMOTE_PROTOCOL = $(top_srcdir)/src/remote/remote_protocol.x
LXC_PROTOCOL = $(top_srcdir)/src/remote/lxc_protocol.x
QEMU_PROTOCOL = $(top_srcdir)/src/remote/qemu_protocol.x
-remote_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+remote_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
$(REMOTE_PROTOCOL)
- $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+ $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
--mode=server remote REMOTE $(REMOTE_PROTOCOL) \
> $(srcdir)/remote_dispatch.h
-lxc_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+lxc_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
$(LXC_PROTOCOL)
- $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+ $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
--mode=server lxc LXC $(LXC_PROTOCOL) \
> $(srcdir)/lxc_dispatch.h
-qemu_dispatch.h: $(srcdir)/../src/rpc/gendispatch.pl \
+qemu_dispatch.h: $(top_srcdir)/src/rpc/gendispatch.pl \
$(QEMU_PROTOCOL)
- $(AM_V_GEN)$(PERL) -w $(srcdir)/../src/rpc/gendispatch.pl \
+ $(AM_V_GEN)$(PERL) -w $(top_srcdir)/src/rpc/gendispatch.pl \
--mode=server qemu QEMU $(QEMU_PROTOCOL) \
> $(srcdir)/qemu_dispatch.h
diff --git a/docs/Makefile.am b/docs/Makefile.am
index a497256..f43da93 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -199,10 +199,10 @@ todo:
hvsupport.html:: $(srcdir)/hvsupport.html.in
$(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \
- $(srcdir)/../src/libvirt_public.syms \
- $(srcdir)/../src/libvirt_qemu.syms $(srcdir)/../src/libvirt_lxc.syms \
- $(srcdir)/../src/driver.h
- $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(srcdir)/../src > $@ \
+ $(top_srcdir)/src/libvirt_public.syms \
+ $(top_srcdir)/src/libvirt_qemu.syms $(top_srcdir)/src/libvirt_lxc.syms \
+ $(top_srcdir)/src/driver.h
+ $(AM_V_GEN)$(PERL) $(srcdir)/hvsupport.pl $(top_srcdir)/src > $@ \
|| { rm $@ && exit 1; }
.PHONY: todo
@@ -290,27 +290,27 @@ EXTRA_DIST += $(APIBUILD_STAMP)
$(python_generated_files): $(APIBUILD_STAMP)
$(APIBUILD_STAMP): $(srcdir)/apibuild.py \
- $(srcdir)/../include/libvirt/libvirt.h.in \
- $(srcdir)/../include/libvirt/libvirt-domain-snapshot.h \
- $(srcdir)/../include/libvirt/libvirt-domain.h \
- $(srcdir)/../include/libvirt/libvirt-event.h \
- $(srcdir)/../include/libvirt/libvirt-host.h \
- $(srcdir)/../include/libvirt/libvirt-interface.h \
- $(srcdir)/../include/libvirt/libvirt-network.h \
- $(srcdir)/../include/libvirt/libvirt-nodedev.h \
- $(srcdir)/../include/libvirt/libvirt-nwfilter.h \
- $(srcdir)/../include/libvirt/libvirt-secret.h \
- $(srcdir)/../include/libvirt/libvirt-storage.h \
- $(srcdir)/../include/libvirt/libvirt-stream.h \
- $(srcdir)/../include/libvirt/libvirt-lxc.h \
- $(srcdir)/../include/libvirt/libvirt-qemu.h \
- $(srcdir)/../include/libvirt/virterror.h \
- $(srcdir)/../src/libvirt.c \
- $(srcdir)/../src/libvirt-lxc.c \
- $(srcdir)/../src/libvirt-qemu.c \
- $(srcdir)/../src/util/virerror.c \
- $(srcdir)/../src/util/virevent.c \
- $(srcdir)/../src/util/virtypedparam.c
+ $(top_srcdir)/include/libvirt/libvirt.h.in \
+ $(top_srcdir)/include/libvirt/libvirt-domain-snapshot.h \
+ $(top_srcdir)/include/libvirt/libvirt-domain.h \
+ $(top_srcdir)/include/libvirt/libvirt-event.h \
+ $(top_srcdir)/include/libvirt/libvirt-host.h \
+ $(top_srcdir)/include/libvirt/libvirt-interface.h \
+ $(top_srcdir)/include/libvirt/libvirt-network.h \
+ $(top_srcdir)/include/libvirt/libvirt-nodedev.h \
+ $(top_srcdir)/include/libvirt/libvirt-nwfilter.h \
+ $(top_srcdir)/include/libvirt/libvirt-secret.h \
+ $(top_srcdir)/include/libvirt/libvirt-storage.h \
+ $(top_srcdir)/include/libvirt/libvirt-stream.h \
+ $(top_srcdir)/include/libvirt/libvirt-lxc.h \
+ $(top_srcdir)/include/libvirt/libvirt-qemu.h \
+ $(top_srcdir)/include/libvirt/virterror.h \
+ $(top_srcdir)/src/libvirt.c \
+ $(top_srcdir)/src/libvirt-lxc.c \
+ $(top_srcdir)/src/libvirt-qemu.c \
+ $(top_srcdir)/src/util/virerror.c \
+ $(top_srcdir)/src/util/virevent.c \
+ $(top_srcdir)/src/util/virtypedparam.c
$(AM_V_GEN)srcdir=$(srcdir) $(PYTHON) $(APIBUILD)
touch $@
diff --git a/src/Makefile.am b/src/Makefile.am
index 33ee723..17cf318 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,7 +20,7 @@
abs_builddir = $(shell pwd)
abs_topbuilddir = $(shell cd .. && pwd)
abs_srcdir = $(shell cd $(srcdir) && pwd)
-abs_topsrcdir = $(shell cd $(srcdir)/.. && pwd)
+abs_topsrcdir = $(shell cd $(top_srcdir) && pwd)
# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
diff --git a/tests/schematestutils.sh b/tests/schematestutils.sh
index a0ff77e..e07e9b9 100644
--- a/tests/schematestutils.sh
+++ b/tests/schematestutils.sh
@@ -5,7 +5,7 @@
check_schema () {
DIRS=$1
-SCHEMA="$abs_srcdir/../docs/schemas/$2"
+SCHEMA="$abs_top_srcdir/docs/schemas/$2"
test_intro $this_test
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] qemu: Fix the crash in qemuDomainBlockCopyCommon
by Shanzhi Yu
The crash caused when checking the backing file path of a disk while
the disk has no backing file, add a check before using disk->src->backingStore->path
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1215569
---
src/qemu/qemu_driver.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 70bf7aa..175d00b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -16816,6 +16816,15 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm,
goto endjob;
if ((flags & VIR_DOMAIN_BLOCK_COPY_SHALLOW) &&
+ !disk->src->backingStore) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("disk '%s' has no backing file, so shallow copy "
+ "is not possible"),
+ disk->src->path);
+ goto endjob;
+ }
+
+ if ((flags & VIR_DOMAIN_BLOCK_COPY_SHALLOW) &&
mirror->format == VIR_STORAGE_FILE_RAW &&
disk->src->backingStore->path) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
--
2.1.0
9 years, 8 months
[libvirt] question: any conference available?
by zhang bo
Besides the maillist and IRC, are there any other means of communication available for libvirt?
I'm much concerned about scheduled conference, including online conferences(weekly? monthly?) or face-to-face conference.
so that developers from all around could join together to share about libvirt's roadmap, release plan, etc.
Thank you for your reply in advance.
9 years, 8 months
[libvirt] [PATCH] Fix check for return value of qemuDomainAgentAvailable()
by Martin Kletzander
Commit dcbb243bbc3470431d15cec4c5bb96d2de89a88b used the return value of
the function as int even though it returns bool.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 70bf7aa..31cbccb 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -19829,7 +19829,7 @@ qemuDomainInterfaceAddresses(virDomainPtr dom,
if (qemuDomainObjBeginJob(driver, vm, QEMU_JOB_QUERY) < 0)
goto cleanup;
- if (qemuDomainAgentAvailable(vm, true) < 0)
+ if (!qemuDomainAgentAvailable(vm, true))
goto endjob;
qemuDomainObjEnterAgent(vm);
--
2.3.6
9 years, 8 months
[libvirt] [PATCH 0/6] fix a serial of memleaks
by Zhang Bo
Zhang Bo (6):
tests: fix some memleaks in tests
util: fix memleak in virFindSCSIHostByPCI
qemu: fix memleaks in qemuBuildCommandLine
qemu: fix memleak in virCapabilitiesDomainDataLookup
conf: fix memleak in virDomainNetIpParseXML
conf: fix memleak in virDomainHostdevDefClear
src/conf/capabilities.c | 5 +++--
src/conf/domain_conf.c | 18 ++++++++++--------
src/qemu/qemu_command.c | 2 ++
src/util/virutil.c | 3 +++
tests/commandtest.c | 1 +
tests/domaincapstest.c | 1 +
tests/qemucommandutiltest.c | 1 +
7 files changed, 21 insertions(+), 10 deletions(-)
--
1.7.12.4
9 years, 8 months
[libvirt] [PATCH] qemu: Fix comment for timeDelta
by Jiri Denemark
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
Pushed as trivial.
src/qemu/qemu_domain.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 76a4819..1d3c77a 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -107,7 +107,7 @@ struct _qemuDomainJobInfo {
/* Computed values */
unsigned long long timeElapsed;
unsigned long long timeRemaining;
- long long timeDelta; /* delta = sent - received, i.e., the difference
+ long long timeDelta; /* delta = received - sent, i.e., the difference
between the source and the destination time plus
the time between the end of Perform phase on the
source and the beginning of Finish phase on the
--
2.3.5
9 years, 8 months
[libvirt] [PATCH] migration: Usable time statistics without requiring NTP
by Jiri Denemark
virDomainGetJobStats is able to report statistics of a completed
migration, however to get usable downtime and total time statistics both
hosts have to keep synchronized time. To provide at least some
estimation of the times even when NTP daemons are not running on both
hosts we can just ignore the time needed to transfer a migration cookie
to the destination host. The result will be also inaccurate but a bit
more predictable. The total/down time will just be at least what we
report.
https://bugzilla.redhat.com/show_bug.cgi?id=1213434
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
include/libvirt/libvirt-domain.h | 23 ++++++++++++++++++++++-
src/qemu/qemu_domain.c | 15 +++++++++++++++
src/qemu/qemu_domain.h | 9 +++++++++
src/qemu/qemu_migration.c | 26 +++++++++++++-------------
tools/virsh-domain.c | 16 ++++++++++++++++
5 files changed, 75 insertions(+), 14 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 8a4fe53..5c0a382 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -2548,6 +2548,16 @@ int virDomainAbortJob(virDomainPtr dom);
# define VIR_DOMAIN_JOB_TIME_ELAPSED "time_elapsed"
/**
+ * VIR_DOMAIN_JOB_TIME_ELAPSED_NET:
+ *
+ * virDomainGetJobStats field: time (ms) since the beginning of the
+ * migration job NOT including the time required to transfer control
+ * flow from the source host to the destination host,
+ * as VIR_TYPED_PARAM_ULLONG.
+ */
+# define VIR_DOMAIN_JOB_TIME_ELAPSED_NET "time_elapsed_net"
+
+/**
* VIR_DOMAIN_JOB_TIME_REMAINING:
*
* virDomainGetJobStats field: remaining time (ms) for VIR_DOMAIN_JOB_BOUNDED
@@ -2561,11 +2571,22 @@ int virDomainAbortJob(virDomainPtr dom);
* VIR_DOMAIN_JOB_DOWNTIME:
*
* virDomainGetJobStats field: downtime (ms) that is expected to happen
- * during migration, as VIR_TYPED_PARAM_ULLONG.
+ * during migration, as VIR_TYPED_PARAM_ULLONG. The real computed downtime
+ * between the time guest CPUs were paused and the time they were resumed
+ * is reported for completed migration.
*/
# define VIR_DOMAIN_JOB_DOWNTIME "downtime"
/**
+ * VIR_DOMAIN_JOB_DOWNTIME_NET:
+ *
+ * virDomainGetJobStats field: real measured downtime (ms) NOT including
+ * the time required to transfer control flow from the source host to the
+ * destination host, as VIR_TYPED_PARAM_ULLONG.
+ */
+# define VIR_DOMAIN_JOB_DOWNTIME_NET "downtime_net"
+
+/**
* VIR_DOMAIN_JOB_SETUP_TIME:
*
* virDomainGetJobStats field: total time in milliseconds spent preparing
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 1368386..ff223a0 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -288,6 +288,13 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
jobInfo->timeElapsed) < 0)
goto error;
+ if (jobInfo->timeDelta &&
+ jobInfo->timeElapsed > jobInfo->timeDelta &&
+ virTypedParamsAddULLong(&par, &npar, &maxpar,
+ VIR_DOMAIN_JOB_TIME_ELAPSED_NET,
+ jobInfo->timeElapsed - jobInfo->timeDelta) < 0)
+ goto error;
+
if (jobInfo->type == VIR_DOMAIN_JOB_BOUNDED &&
virTypedParamsAddULLong(&par, &npar, &maxpar,
VIR_DOMAIN_JOB_TIME_REMAINING,
@@ -300,6 +307,14 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo,
status->downtime) < 0)
goto error;
+ if (status->downtime_set &&
+ jobInfo->timeDelta &&
+ status->downtime > jobInfo->timeDelta &&
+ virTypedParamsAddULLong(&par, &npar, &maxpar,
+ VIR_DOMAIN_JOB_DOWNTIME_NET,
+ status->downtime - jobInfo->timeDelta) < 0)
+ goto error;
+
if (status->setup_time_set &&
virTypedParamsAddULLong(&par, &npar, &maxpar,
VIR_DOMAIN_JOB_SETUP_TIME,
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 6bea7c7..1b93f7d 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -100,9 +100,18 @@ struct _qemuDomainJobInfo {
virDomainJobType type;
unsigned long long started; /* When the async job started */
unsigned long long stopped; /* When the domain's CPUs were stopped */
+ unsigned long long sent; /* When the source sent status info to the
+ destination (only for migrations). */
+ unsigned long long received; /* When the destination host received status
+ info from the source (migrations only). */
/* Computed values */
unsigned long long timeElapsed;
unsigned long long timeRemaining;
+ long long timeDelta; /* delta = sent - received, i.e., the difference
+ between the source and the destination time plus
+ the time between the end of Perform phase on the
+ source and the beginning of Finish phase on the
+ destination. */
/* Raw values from QEMU */
qemuMonitorMigrationStatus status;
};
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 1da687c..4b3143f 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -688,6 +688,8 @@ qemuMigrationCookieStatisticsXMLFormat(virBufferPtr buf,
virBufferAsprintf(buf, "<started>%llu</started>\n", jobInfo->started);
virBufferAsprintf(buf, "<stopped>%llu</stopped>\n", jobInfo->stopped);
+ virBufferAsprintf(buf, "<sent>%llu</sent>\n", jobInfo->sent);
+ virBufferAsprintf(buf, "<delta>%lld</delta>\n", jobInfo->timeDelta);
virBufferAsprintf(buf, "<%1$s>%2$llu</%1$s>\n",
VIR_DOMAIN_JOB_TIME_ELAPSED,
@@ -1046,11 +1048,14 @@ qemuMigrationCookieStatisticsXMLParse(xmlXPathContextPtr ctxt)
virXPathULongLong("string(./started[1])", ctxt, &jobInfo->started);
virXPathULongLong("string(./stopped[1])", ctxt, &jobInfo->stopped);
+ virXPathULongLong("string(./sent[1])", ctxt, &jobInfo->sent);
+ virXPathLongLong("string(./delta[1])", ctxt, &jobInfo->timeDelta);
virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_ELAPSED "[1])",
ctxt, &jobInfo->timeElapsed);
virXPathULongLong("string(./" VIR_DOMAIN_JOB_TIME_REMAINING "[1])",
ctxt, &jobInfo->timeRemaining);
+
if (virXPathULongLong("string(./" VIR_DOMAIN_JOB_DOWNTIME "[1])",
ctxt, &status->downtime) == 0)
status->downtime_set = true;
@@ -3438,18 +3443,9 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver,
/* Update total times with the values sent by the destination daemon */
if (mig->jobInfo) {
qemuDomainObjPrivatePtr priv = vm->privateData;
- if (priv->job.completed) {
- qemuDomainJobInfoPtr jobInfo = priv->job.completed;
- if (mig->jobInfo->status.downtime_set) {
- jobInfo->status.downtime = mig->jobInfo->status.downtime;
- jobInfo->status.downtime_set = true;
- }
- if (mig->jobInfo->timeElapsed)
- jobInfo->timeElapsed = mig->jobInfo->timeElapsed;
- } else {
- priv->job.completed = mig->jobInfo;
- mig->jobInfo = NULL;
- }
+ VIR_FREE(priv->job.completed);
+ priv->job.completed = mig->jobInfo;
+ mig->jobInfo = NULL;
}
if (flags & VIR_MIGRATE_OFFLINE)
@@ -4041,6 +4037,7 @@ qemuMigrationRun(virQEMUDriverPtr driver,
if (priv->job.completed) {
qemuDomainJobInfoUpdateTime(priv->job.completed);
qemuDomainJobInfoUpdateDowntime(priv->job.completed);
+ ignore_value(virTimeMillisNow(&priv->job.completed->sent));
}
if (priv->job.current->type == VIR_DOMAIN_JOB_UNBOUNDED)
@@ -5164,8 +5161,11 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
}
if (mig->jobInfo) {
- priv->job.completed = mig->jobInfo;
+ qemuDomainJobInfoPtr jobInfo = mig->jobInfo;
+ priv->job.completed = jobInfo;
mig->jobInfo = NULL;
+ if (jobInfo->sent && virTimeMillisNow(&jobInfo->received) == 0)
+ jobInfo->timeDelta = jobInfo->received - jobInfo->sent;
}
if (!(flags & VIR_MIGRATE_OFFLINE)) {
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 4f58f07..6e79c4d 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5764,6 +5764,15 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
}
vshPrint(ctl, "%-17s %-12llu ms\n", _("Time elapsed:"), info.timeElapsed);
+ if ((rc = virTypedParamsGetULLong(params, nparams,
+ VIR_DOMAIN_JOB_TIME_ELAPSED_NET,
+ &value)) < 0) {
+ goto save_error;
+ } else if (rc && value) {
+ vshPrint(ctl, "%-17s %-12llu ms\n", _("Time elapsed w/o network:"),
+ value);
+ }
+
if (info.type == VIR_DOMAIN_JOB_BOUNDED)
vshPrint(ctl, "%-17s %-12llu ms\n", _("Time remaining:"),
info.timeRemaining);
@@ -5853,6 +5862,13 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd)
}
if ((rc = virTypedParamsGetULLong(params, nparams,
+ VIR_DOMAIN_JOB_DOWNTIME_NET,
+ &value)) < 0)
+ goto save_error;
+ else if (rc)
+ vshPrint(ctl, "%-17s %-12llu ms\n", _("Downtime w/o network:"), value);
+
+ if ((rc = virTypedParamsGetULLong(params, nparams,
VIR_DOMAIN_JOB_SETUP_TIME,
&value)) < 0)
goto save_error;
--
2.3.5
9 years, 8 months
[libvirt] [PATCH] storage: Resolve Coverity UNINIT
by John Ferlan
commit id '1e13eff4' didn't init found when changed from a bool to
an int in virStoragePoolFCRefreshThread and Coverity...
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/storage/storage_backend_scsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index f381ddb..e6c8bb5 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -581,7 +581,7 @@ virStoragePoolFCRefreshThread(void *opaque)
const char *name = cbdata->name;
virStoragePoolObjPtr pool = cbdata->pool;
unsigned int host;
- int found;
+ int found = 0;
int tries = 2;
do {
--
2.1.0
9 years, 8 months