From nobody Fri May 3 20:28:02 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1612375864; cv=none; d=zohomail.com; s=zohoarc; b=JdxVA1+uJx31XxwT6BwAfuakZquf3pKTh2ttb7EpQMkGsiZvkZqFUjO0BBfAIfwsJQlVFmRwWtCv/4QHEHt9hBqhR89BzmFwSQXCbENQUZLW9nl/iNA4Q2hW7+9hWL0efAoCbY1gnHOjI6MTCotkIGT662bKJnmMZPE5P6RF5nc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612375864; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=NRYjDt2HBvqBQtBE60u4s6SyacPz/Q7fjeJxbLd/0RA=; b=anW3SbbPFshcOOBv0DDnhPdWz7N1NHEgKfuoplOVomQ5tVcX7TVXsW2MWXp+Rj4tX1PbU1qPcEKw4JhGxm48FMIVa3/kguYfvEfDzloyGrT56/PXZYfOzRFpUpvLXSUzyiz6VFGVMxhLqTwO6OH29gQjvtxQo4rgbQ0nbVUUjjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612375864660960.4107550951711; Wed, 3 Feb 2021 10:11:04 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-403-jBdPIxOEOOC_seOMHwPiow-1; Wed, 03 Feb 2021 13:11:01 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E370F835E21; Wed, 3 Feb 2021 18:10:54 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 69CB21971D; Wed, 3 Feb 2021 18:10:54 +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 E457057DFA; Wed, 3 Feb 2021 18:10:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 113IApOb028976 for ; Wed, 3 Feb 2021 13:10:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id 6E5F150DE3; Wed, 3 Feb 2021 18:10:51 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id DFD14722C7 for ; Wed, 3 Feb 2021 18:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612375863; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NRYjDt2HBvqBQtBE60u4s6SyacPz/Q7fjeJxbLd/0RA=; b=IG47RCxUsgGSaHkbe5fvFiJmiH8C6Z2wxjAJC0znrtDN5GJIKcJ/TxRd60veba4neCP5dT JYkRcuEntuJys3DNjweRKRDE7v/mtHeXwYEI1tqVLkhYBR/ddKhR72Pd7EplF70ZiEA1rd ZEJACv5cWMqQVHjiOttsiPRlhBmpJC8= X-MC-Unique: jBdPIxOEOOC_seOMHwPiow-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu_driver: increase recorded counter for disk block stats Date: Wed, 3 Feb 2021 19:10:44 +0100 Message-Id: <1bbcd14ae92cffcb9ea97c35b0b5c03b544a8f09.1612375813.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" Commit <318d807a0bd3372b634d1952b559c5c627ccfa5b> added a fix to skip most of the block stat code to not log error message for missing storage sources but forgot to increase the recordnr counter. Signed-off-by: Pavel Hrdina Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 69fcd28666..c34af6b7d1 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -18414,8 +18414,14 @@ qemuDomainGetStatsBlockExportDisk(virDomainDiskDef= Ptr disk, VIR_INFO("optional disk '%s' source file is missing, " "skip getting stats", disk->dst); =20 - return qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recor= dnr, - params); + if (qemuDomainGetStatsBlockExportHeader(disk, disk->src, *recordnr, + params) < 0) { + return -1; + } + + (*recordnr)++; + + return 0; } =20 /* vhost-user disk doesn't support getting block stats */ --=20 2.29.2