From nobody Mon Feb 9 16:12:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1575644895; cv=none; d=zohomail.com; s=zohoarc; b=dT2PCkt9uXfk6BEUASEaNumIUqGBxLY1vXCJcN0WOeMmN1tbJ+nikY1qgIk3w9PIVVZVlSA4g+/hxhTOE69IO6YoCmNjocaqR36DdEshNsWJFuLmNgOEFdU02TjltkD7JGjFxhryJMZDcWhp1l+jcruv7R54Un3FRFDoLXoQYg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575644895; 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=5abjsXVQFd+MQx1H5W5S8cKGwBNmQrQl1FfNodCEmTo=; b=GjZrJy4DxONvKM5nB0SxGam4B76ynyXkCBj2jHbNxMu+gicAyv/Dv0p/06TDxQZvdcZDOyLHJrTjv304e3acR7S3SEyWhnszeKBO1NDR0RT5LsvST6JiuQyjuqsSWsxA8/4V75eYtmaqhT1N9BzQ7z6/brWKMthtUx+CcL7iwn4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1575644895165799.626677088827; Fri, 6 Dec 2019 07:08:15 -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-192-tih6gTFqNZ2TpNB9-Gm2dA-1; Fri, 06 Dec 2019 10:08:12 -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 C0A36108595B; Fri, 6 Dec 2019 15:08:06 +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 924883B3; Fri, 6 Dec 2019 15:08:06 +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 472156B5C5; Fri, 6 Dec 2019 15:08:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xB6F7o8W019326 for ; Fri, 6 Dec 2019 10:07:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id B88D167E52; Fri, 6 Dec 2019 15:07:50 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 413301CB for ; Fri, 6 Dec 2019 15:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575644893; 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=5abjsXVQFd+MQx1H5W5S8cKGwBNmQrQl1FfNodCEmTo=; b=UJEb9DzE165pObfcY8qG15XIjLQlPqLLSSFqlh+1dZSO98VfBdS56rrwNN8VeysDZ6uBqH hcIR9SHKu1+VDtIFASok5zBgzgpx278zyiumQmcdqsgOEr5+7wbJZCYgQiTkv30az+K4Ed KGQcQr0W/PhvsqWw08COWv5RJ7Yotog= From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 6 Dec 2019 16:07:44 +0100 Message-Id: <43a547f82615872786be866a10b3c3205aab1674.1575644811.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/3] qemu: driver: Use appropriate job name when setting blockjob speed 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 X-MC-Unique: tih6gTFqNZ2TpNB9-Gm2dA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" qemuDomainBlockJobSetSpeed was not converted to get the job name from the block job data. This means that after enabling blockdev the API call would fail as we wouldn't use the appropriate name. https://bugzilla.redhat.com/show_bug.cgi?id=3D1780497 Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 82f70465bc..84c633aebf 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17854,8 +17854,8 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom, virDomainDiskDefPtr disk; int ret =3D -1; virDomainObjPtr vm; - g_autofree char *device =3D NULL; unsigned long long speed =3D bandwidth; + g_autoptr(qemuBlockJobData) job =3D NULL; virCheckFlags(VIR_DOMAIN_BLOCK_JOB_SPEED_BANDWIDTH_BYTES, -1); @@ -17885,12 +17885,15 @@ qemuDomainBlockJobSetSpeed(virDomainPtr dom, if (!(disk =3D qemuDomainDiskByName(vm->def, path))) goto endjob; - if (!(device =3D qemuAliasDiskDriveFromDisk(disk))) + if (!(job =3D qemuBlockJobDiskGetJob(disk))) { + virReportError(VIR_ERR_INVALID_ARG, + _("disk %s does not have an active block job"), dis= k->dst); goto endjob; + } qemuDomainObjEnterMonitor(driver, vm); ret =3D qemuMonitorBlockJobSetSpeed(qemuDomainGetMonitor(vm), - device, + job->name, speed); if (qemuDomainObjExitMonitor(driver, vm) < 0) ret =3D -1; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list