From nobody Sun May 5 17:16:10 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1615814055; cv=none; d=zohomail.com; s=zohoarc; b=YNMztcA7SEtqFLuhJ85kCfWhbtNogzzEV/7yPpivs/hKhL4tGqyqGzFucpZ5iryXifsfhEmP5snjLClcfC/bIFSQVt85/AHmb9eCsWt3aUW+CcsHiwr1XwuT2E3egkFsoWhTa2jPhlReYVuLbYx0EgloBAOYrdiZMmS6Lbmqyic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615814055; 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=DyBMFhaoh02oh37xk5ctUg+hvJAnBsfbGeUtDBHuVP0=; b=Y16xJBDWYCS8pxU8bvO8XVnomKanQ52Q68oOtFnFz06LKjR/zLI1szo6OkfdN4WBEQnZxexJTBKpmuRN8KbvqLP61nBWqUd7DxZ3KAQNqToIgIemxFg+7LbxG21svv4POrmMbEMC07dFQL3SVNDdlJm9KiMtg38z6H4kMpCDPOI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1615814055127866.2575027995788; Mon, 15 Mar 2021 06:14:15 -0700 (PDT) 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-232-kbuY0tLUNFGYu59mCPbHuw-1; Mon, 15 Mar 2021 09:14:10 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C568D1858F2C; Mon, 15 Mar 2021 13:14:04 +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 F2D6017B80; Mon, 15 Mar 2021 13:14:02 +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 B3635464F9; Mon, 15 Mar 2021 13:14:00 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 12FDDwiS003811 for ; Mon, 15 Mar 2021 09:13:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id 7D99C5D9D3; Mon, 15 Mar 2021 13:13:58 +0000 (UTC) Received: from antique-work.lan (unknown [10.40.192.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id EFE805D9C0 for ; Mon, 15 Mar 2021 13:13:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615814053; 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=DyBMFhaoh02oh37xk5ctUg+hvJAnBsfbGeUtDBHuVP0=; b=gMd8cU/XX6kUvuleEf19vxm/1scUCjBJH1qJI/JaSKnnBahByendCU2iZHvtabjJVI64r6 BXuXVDDnEVx8+ex006xCUxggkVjGT+oZeS1mRA80/bbP2RnHcGcKpMkGbIWwcgJbNy1oWb mHJAtE760MFBcTGkLCvoi+tpc7+6bBk= X-MC-Unique: kbuY0tLUNFGYu59mCPbHuw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu_driver: fix setting vcpu_quota if not all vCPUs are online Date: Mon, 15 Mar 2021 14:13:50 +0100 Message-Id: <85affd4b5cc1b96f5df95d552362f41f601a69be.1615813992.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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.79 on 10.5.11.12 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" When switching to g_autoptr this was incorrectly changed from 'continue;' into 'return -1;' resulting into an error when user tries to set vcpu_quota of running VM: error: An error occurred, but the cause is unknown Fixes: e4a8bbfaf2b4cdd741bb441873bb730f9134b714 Signed-off-by: Pavel Hrdina Reviewed-by: Erik Skultety --- 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 b7c89a826a..16c5ccae45 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9204,7 +9204,7 @@ qemuSetVcpusBWLive(virDomainObjPtr vm, virCgroupPtr c= group, virDomainVcpuDefPtr vcpu =3D virDomainDefGetVcpu(vm->def, i); =20 if (!vcpu->online) - return -1; + continue; =20 if (virCgroupNewThread(cgroup, VIR_CGROUP_THREAD_VCPU, i, false, &cgroup_vcpu) < 0) --=20 2.30.2