Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libvirt
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Libvirt Packaging Team
libvirt
Commits
d0085e0b
Commit
d0085e0b
authored
10 years ago
by
Guido Günther
Browse files
Options
Downloads
Patches
Plain Diff
qemu: bulk stats: Fix logic in monitor handling
parent
d7df883d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
debian/patches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
+36
-0
36 additions, 0 deletions
...tches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
debian/patches/series
+1
-0
1 addition, 0 deletions
debian/patches/series
with
37 additions
and
0 deletions
debian/patches/qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
0 → 100644
+
36
−
0
View file @
d0085e0b
From: Francesco Romani <fromani@redhat.com>
Date: Thu, 11 Dec 2014 08:44:09 +0100
Subject: qemu: bulk stats: Fix logic in monitor handling
A logic bug in qemuConnectGetAllDomainStats makes the code mark the
monitor as available when qemuDomainObjBeginJob fails, instead of when
it succeeds, as the correct flow requires.
This patch fixes the check and updates the code documentation
accordingly.
Broken by commit 57023c0a3af4af1c547189c1f6712ed5edeb0c0b.
Signed-off-by: Francesco Romani <fromani@redhat.com>
(cherry picked from commit cb104ef734dfea12cb8826dba7e2c98912c4b7e1)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
src/qemu/qemu_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 14a1ae9..048ded9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -18153,9 +18153,9 @@
qemuConnectGetAllDomainStats(virConnectPtr conn,
}
if (HAVE_JOB(privflags) &&
- qemuDomainObjBeginJob(driver, dom, QEMU_JOB_QUERY) < 0)
- /* As it was never requested. Gather as much as possible anyway. */
+ qemuDomainObjBeginJob(driver, dom, QEMU_JOB_QUERY) == 0)
domflags |= QEMU_DOMAIN_STATS_HAVE_JOB;
+ /* else: without a job it's still possible to gather some data */
if (qemuDomainGetStats(conn, dom, stats, &tmp, domflags) < 0)
goto endjob;
This diff is collapsed.
Click to expand it.
debian/patches/series
+
1
−
0
View file @
d0085e0b
...
...
@@ -17,3 +17,4 @@ qemu-use-systemd-s-TerminateMachine-to-kill-all-proc.patch
security/CVE-2014-7823-dumpxml-security-hole-with-migratable-.patch
util-Prepare-URI-formatting-for-libxml2-2.9.2.patch
security/CVE-2014-8131-Fix-possible-deadlock-and-segfault-in-.patch
qemu-bulk-stats-Fix-logic-in-monitor-handling.patch
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment