From nobody Mon Feb 9 01:17:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1568913260; cv=none; d=zoho.com; s=zohoarc; b=ZWhxNu7dqJd2CcMPMee0JOviVJvZ16u22F5GE3UJsQlY7tiQZ96vi3zIroW9uYQsPu+BLnvTOeEiQVpCUVkK1jqJ2mi6INCU7xT4PzMB9YgWOA+uTpDsWqSXgq60dtRhD1vJPIlTO3Dbk1UNxgNtFJZ6eQyUs1czJJ1cCdsKTTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1568913260; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=E+Z9HdR7i5x3DbnsDZ39l0fJvL5yd4yj5CR+96W9uNg=; b=NgCKtYU1VaCJCIcM0aY7bKFNRtnB6K0EX0LRyCfUFOfgFmd6YkNi40TuE0gt79kS4uwkiwPR0W2VR4hViFYtFJs7vg5QQKevUqxxCQyLbC/xNKGkZGr4PxHdckxvlKITFfvABR/H9vkaJsVweAeYxrnYGgAdVQHV5kUR/pDhk/U= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1568913260685751.0282092060738; Thu, 19 Sep 2019 10:14:20 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAD3AC04BD33; Thu, 19 Sep 2019 17:14:18 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B66596062A; Thu, 19 Sep 2019 17:14:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7786F180BA9E; Thu, 19 Sep 2019 17:14:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x8JHEAYN004944 for ; Thu, 19 Sep 2019 13:14:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9029060C5E; Thu, 19 Sep 2019 17:14:10 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1831160C83 for ; Thu, 19 Sep 2019 17:14:07 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Thu, 19 Sep 2019 19:13:24 +0200 Message-Id: <52c4f188e02a7dfddb0503e12e1662056bd18279.1568911535.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 21/22] qemu: driver: Stop using QEMU_ADD_BLOCK_PARAM_ULL in qemuDomainGetStatsBlockExportFrontend X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 19 Sep 2019 17:14:19 +0000 (UTC) Content-Type: text/plain; charset="utf-8" The macro now became unused so it was deleted. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_driver.c | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2163d14cea..f0f08dcbfc 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -21360,10 +21360,6 @@ qemuDomainGetStatsInterface(virQEMUDriverPtr drive= r ATTRIBUTE_UNUSED, #undef QEMU_ADD_NET_PARAM -#define QEMU_ADD_BLOCK_PARAM_ULL(params, num, name, value) \ - if (virTypedParamListAddULL((params), (value), "block.%zu.%s", (num), = (name)) < 0) \ - goto cleanup - /* refresh information by opening images on the disk */ static int qemuDomainGetStatsOneBlockFallback(virQEMUDriverPtr driver, @@ -21509,32 +21505,28 @@ qemuDomainGetStatsBlockExportBackendStorage(const= char *entryname, static int qemuDomainGetStatsBlockExportFrontend(const char *frontendname, virHashTablePtr stats, - size_t recordnr, - virTypedParamListPtr params) + size_t idx, + virTypedParamListPtr par) { - qemuBlockStats *entry; - int ret =3D -1; + qemuBlockStats *en; /* In case where qemu didn't provide the stats we stop here rather than * trying to refresh the stats from the disk. Inability to provide sta= ts is * usually caused by blocked storage so this would make libvirtd hang = */ - if (!stats || !frontendname || !(entry =3D virHashLookup(stats, fronte= ndname))) { - ret =3D 0; - goto cleanup; - } + if (!stats || !frontendname || !(en =3D virHashLookup(stats, frontendn= ame))) + return 0; - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.reqs", entry->rd_req); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.bytes", entry->rd_bytes= ); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "rd.times", entry->rd_total= _times); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.reqs", entry->wr_req); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.bytes", entry->wr_bytes= ); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "wr.times", entry->wr_total= _times); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "fl.reqs", entry->flush_req= ); - QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "fl.times", entry->flush_to= tal_times); + if (virTypedParamListAddULL(par, en->rd_req, "block.%zu.rd.reqs", idx)= < 0 || + virTypedParamListAddULL(par, en->rd_bytes, "block.%zu.rd.bytes", i= dx) < 0 || + virTypedParamListAddULL(par, en->rd_total_times, "block.%zu.rd.tim= es", idx) < 0 || + virTypedParamListAddULL(par, en->wr_req, "block.%zu.wr.reqs", idx)= < 0 || + virTypedParamListAddULL(par, en->wr_bytes, "block.%zu.wr.bytes", i= dx) < 0 || + virTypedParamListAddULL(par, en->wr_total_times, "block.%zu.wr.tim= es", idx) < 0 || + virTypedParamListAddULL(par, en->flush_req, "block.%zu.fl.reqs", i= dx) < 0 || + virTypedParamListAddULL(par, en->flush_total_times, "block.%zu.fl.= times", idx) < 0) + return -1; - ret =3D 0; - cleanup: - return ret; + return 0; } @@ -21725,7 +21717,6 @@ qemuDomainGetStatsBlock(virQEMUDriverPtr driver, return ret; } -#undef QEMU_ADD_BLOCK_PARAM_ULL static int qemuDomainGetStatsIOThread(virQEMUDriverPtr driver, --=20 2.21.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list