From nobody Mon Feb 9 11:28:44 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=1681906458; cv=none; d=zohomail.com; s=zohoarc; b=g1KZH0XEa5j+3dJtJwvycKQu8rPRRhQjhS54EEhdGJvKtTbZA3KTTYXceeH2I9TTqYyNJgFWz6pKuWpGHdQy2R/CcF9B2kZsuEM7ntPwykJ+b/0vZZtVEoiLHaznkhEtObaUcUQt/7n36Xuq84hmIeBj/O3kBemJKxdkZOkJJGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1681906458; 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=9TNZDdvQ5LBDrVuYoY12s+rySpVmwIoXWdMTOaP/HmY=; b=Hz/2wbuzKYOBcYdEJ+jpV6qqGprzJg3vvqeQFbmNnM4MvYI/zwRem83Ww/yHtPCrcBTTqb2DvjhlOOCZBPS2zHgaxL0omWFAIe7t+SwiN2n55UJWVDl978TPEFTQczlAsHDvt61cgAQ2CXaQiRbfPyHHhD6oTWSfe1bzBEjBNus= 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 1681906458850422.41882250225717; Wed, 19 Apr 2023 05:14:18 -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-427-zprYPQP_ML6N05kC99kFkw-1; Wed, 19 Apr 2023 08:14:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CACEA857FBC; Wed, 19 Apr 2023 12:14:10 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id A784D112131B; Wed, 19 Apr 2023 12:14:10 +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 42DB01946A46; Wed, 19 Apr 2023 12:14:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C195C19465A0 for ; Wed, 19 Apr 2023 12:05:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B3B82492B06; Wed, 19 Apr 2023 12:05:04 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 35AC6492B04 for ; Wed, 19 Apr 2023 12:05:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681906457; 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=9TNZDdvQ5LBDrVuYoY12s+rySpVmwIoXWdMTOaP/HmY=; b=B7Jxq32mkYy3Nx4+utKoocsnc0MpYWxLJ2tHPUT6sh7X6V51fzUD39NP8dqM4hO7AWJcUO pEfSlRD9NCpqd/w1RmYKzMujxr7Y4vDwXhKE73raLhFtSQInwHnyrDo3vYBHKRbrOEfT5Y tkn9g7wWjNZ1y8ocD2gZyVDm9b1Kj2w= X-MC-Unique: zprYPQP_ML6N05kC99kFkw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH v3 23/25] virsh: cmdIOThreadSet: Use bigger types for --poll-grow and --poll-shrink Date: Wed, 19 Apr 2023 14:04:40 +0200 Message-Id: <4f644b2ed6b9b886f2cdcb708f2fc0a847ebc2c7.1681905482.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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 3.1 on 10.11.54.3 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: 1681906460647100001 Content-Type: text/plain; charset="utf-8" The qemu driver now accepts also _ULLONG as type for bigger numbers. Use the 'virTypedParamListAddUnsigned' helper to use the bigger typed parameter type if necessary to allow full range of the values while preserving compatibility. Signed-off-by: Peter Krempa --- tools/virsh-domain.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index d37e27000b..db47d63d85 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -7853,8 +7853,7 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd) g_autoptr(virTypedParamList) params =3D virTypedParamListNew(); virTypedParameterPtr par; size_t npar =3D 0; - unsigned long long poll_max; - unsigned int poll_val; + unsigned long long poll_val; int thread_val; int rc; @@ -7876,20 +7875,20 @@ cmdIOThreadSet(vshControl *ctl, const vshCmd *cmd) return false; } - if ((rc =3D vshCommandOptULongLong(ctl, cmd, "poll-max-ns", &poll_max)= ) < 0) + if ((rc =3D vshCommandOptULongLong(ctl, cmd, "poll-max-ns", &poll_val)= ) < 0) return false; if (rc > 0) - virTypedParamListAddULLong(params, poll_max, VIR_DOMAIN_IOTHREAD_P= OLL_MAX_NS); + virTypedParamListAddULLong(params, poll_val, VIR_DOMAIN_IOTHREAD_P= OLL_MAX_NS); - if ((rc =3D vshCommandOptUInt(ctl, cmd, "poll-grow", &poll_val)) < 0) + if ((rc =3D vshCommandOptULongLong(ctl, cmd, "poll-grow", &poll_val)) = < 0) return false; if (rc > 0) - virTypedParamListAddUInt(params, poll_val, VIR_DOMAIN_IOTHREAD_POL= L_GROW); + virTypedParamListAddUnsigned(params, poll_val, VIR_DOMAIN_IOTHREAD= _POLL_GROW); - if ((rc =3D vshCommandOptUInt(ctl, cmd, "poll-shrink", &poll_val)) < 0) + if ((rc =3D vshCommandOptULongLong(ctl, cmd, "poll-shrink", &poll_val)= ) < 0) return false; if (rc > 0) - virTypedParamListAddUInt(params, poll_val, VIR_DOMAIN_IOTHREAD_POL= L_SHRINK); + virTypedParamListAddUnsigned(params, poll_val, VIR_DOMAIN_IOTHREAD= _POLL_SHRINK); if ((rc =3D vshCommandOptInt(ctl, cmd, "thread-pool-min", &thread_val)= ) < 0) return false; --=20 2.39.2