From nobody Mon Feb 9 03:37:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1658846375; cv=none; d=zohomail.com; s=zohoarc; b=elvmBUhwwAu2iVotJTI/Mf7bEmyzcMP7O4GEz1N5VpGNE4SXRzi5/A+P1uuU5w+tycCVooQRyomwT+Zj1CIGX6sy3GeV5nPG5k2umSn3IVz45NB4PJG58AKOS5kGWybUC/saLfwMwR8zQcbsZbc+0ZoprHYJa1uECPka0DtVkwU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658846375; 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; bh=LBAhvI7vv6m9YixvX/3OtwGDeC7j1XQk0TEAsT2q7os=; b=AA2NmxerFPlgJcG7JjsPl+udVsPvt1UWQ6ETILAP6ezQ0rYG2qbZpkLeVrS0FaCqNDRGqh5PZIxfnR3gzICMM60L8GYt1g5ri6TupfRCsXUpwI/cDeg0Vj4vGQU/GefdvZlLRS7MrSJ26u3xu2ILZPDsao82uxorDEaFqp27GOA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1658846375245737.5957033089749; Tue, 26 Jul 2022 07:39:35 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-379-6uMUZ0NeMr-gEomNu7MSCA-1; Tue, 26 Jul 2022 10:39:26 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5380B802E5D; Tue, 26 Jul 2022 14:39:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E4492026D2D; Tue, 26 Jul 2022 14:39:01 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 68FE61947B8D; Tue, 26 Jul 2022 14:38:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F11A519452D8 for ; Tue, 26 Jul 2022 14:38:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D0699400DFD7; Tue, 26 Jul 2022 14:38:53 +0000 (UTC) Received: from speedmetal.lan (unknown [10.40.208.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5241940CF8EE for ; Tue, 26 Jul 2022 14:38:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658846374; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=LBAhvI7vv6m9YixvX/3OtwGDeC7j1XQk0TEAsT2q7os=; b=SHkp0a0/HS6euettcOKUQcbVv6yxggHTf78FXj6c/8VN4ZSalvV2J3BLoB5ck2aJ/KrL1a +CK6N9ou0yyhYafIVAWXt8QFkeasVab8hwW4+pQkvJamFJh9kbFIoPWOqiGCRDVEskkFX3 A/3yXs66wzYW9MNwKHUSEqO4l8L3fQM= X-MC-Unique: 6uMUZ0NeMr-gEomNu7MSCA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 54/80] qemu: monitor: Remove unused qemuMonitorBlockStatsUpdateCapacity Date: Tue, 26 Jul 2022 16:37:32 +0200 Message-Id: <8cc6a3b5ff721e542e934119f8ab53501a7c93d1.1658843187.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658846376399100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- src/qemu/qemu_monitor.c | 11 ------- src/qemu/qemu_monitor.h | 4 --- src/qemu/qemu_monitor_json.c | 59 ------------------------------------ src/qemu/qemu_monitor_json.h | 3 -- 4 files changed, 77 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 5e71945831..f1a9524f28 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2022,17 +2022,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, } -/* Updates "stats" to fill virtual and physical size of the image */ -int -qemuMonitorBlockStatsUpdateCapacity(qemuMonitor *mon, - GHashTable *stats) -{ - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONBlockStatsUpdateCapacity(mon, stats); -} - - int qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, GHashTable *stats) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 24a33b9b29..6e657576ae 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -681,10 +681,6 @@ int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockStatsUpdateCapacity(qemuMonitor *mon, - GHashTable *stats) - ATTRIBUTE_NONNULL(2); - int qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, GHashTable *stats) ATTRIBUTE_NONNULL(2); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 85a36ff68b..b4a33184bd 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2497,65 +2497,6 @@ qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONV= alue *image, } -static int -qemuMonitorJSONBlockStatsUpdateCapacityOne(virJSONValue *image, - const char *dev_name, - int depth, - GHashTable *stats) -{ - g_autofree char *entry_name =3D qemuDomainStorageAlias(dev_name, depth= ); - virJSONValue *backing; - - if (qemuMonitorJSONBlockStatsUpdateCapacityData(image, entry_name, - stats, NULL) < 0) - return -1; - - if ((backing =3D virJSONValueObjectGetObject(image, "backing-image")) = && - qemuMonitorJSONBlockStatsUpdateCapacityOne(backing, - dev_name, - depth + 1, - stats) < 0) - return -1; - - return 0; -} - - -int -qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon, - GHashTable *stats) -{ - size_t i; - g_autoptr(virJSONValue) devices =3D NULL; - - if (!(devices =3D qemuMonitorJSONQueryBlock(mon))) - return -1; - - for (i =3D 0; i < virJSONValueArraySize(devices); i++) { - virJSONValue *dev; - virJSONValue *inserted; - virJSONValue *image; - const char *dev_name; - - if (!(dev =3D qemuMonitorJSONGetBlockDev(devices, i))) - return -1; - - if (!(dev_name =3D qemuMonitorJSONGetBlockDevDevice(dev))) - return -1; - - /* drive may be empty */ - if (!(inserted =3D virJSONValueObjectGetObject(dev, "inserted")) || - !(image =3D virJSONValueObjectGetObject(inserted, "image"))) - continue; - - if (qemuMonitorJSONBlockStatsUpdateCapacityOne(image, dev_name, 0,= stats) < 0) - return -1; - } - - return 0; -} - - static int qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UN= USED, virJSONValue *val, diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index c5716dfe3e..9314baa5ba 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -99,9 +99,6 @@ int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash); int -qemuMonitorJSONBlockStatsUpdateCapacity(qemuMonitor *mon, - GHashTable *stats); -int qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, GHashTable *stats); --=20 2.36.1