render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
Blob Blame History Raw
From 9fba5e8ed9e58e65e2e043e39eea5c9792df64df Mon Sep 17 00:00:00 2001
Message-Id: <9fba5e8ed9e58e65e2e043e39eea5c9792df64df@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Fri, 16 Aug 2019 14:36:58 +0200
Subject: [PATCH] qemu: Don't report some ignored errors in
 qemuDomainGetStatsOneBlockFallback
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The function ignores all errors from qemuStorageLimitsRefresh by calling
virResetLastError. This still logs them. Since qemuStorageLimitsRefresh
allows suppressing some, do so.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 60b862cf9d6a335db65bbf2b011499dfa729ca2e)
https: //bugzilla.redhat.com/show_bug.cgi?id=1724808
Message-Id: <8d6542c54e9518384b1c1eca081edae31a74fed6.1565958906.git.pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@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 88a9f565c4..d95c97928d 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -20035,7 +20035,7 @@ qemuDomainGetStatsOneBlockFallback(virQEMUDriverPtr driver,
     if (virStorageSourceIsEmpty(src))
         return 0;
 
-    if (qemuStorageLimitsRefresh(driver, cfg, dom, src, false) < 0) {
+    if (qemuStorageLimitsRefresh(driver, cfg, dom, src, true) <= 0) {
         virResetLastError();
         return 0;
     }
-- 
2.22.1