From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694415; cv=none; d=zoho.com; s=zohoarc; b=ZM9JQ0jUfe9VWLGPXdTuxEeA/pgR5AK/0dhVnFhYC1BP0wDK2ENDJOtCeM0k9nofb9+gaZwQBJpei8DuZ34hwlHcX6QV7SfBGomEpzQa++BdCwTJ21njGqpRru/7p6onUVhHIf3ChF1+PLqhVG2H9tswJV8VP/XB/3xecdPSFqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694415; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=JMFbq2rupqBQLo9sn5xPbOB1kUPCFXv8smvULn3W9jI=; b=HrgSaBxH54FKtQjoCcgxwlJ67vMFrNjdlrBb+fwSPxYQ2I6uuQB7jK2ChB13aAcQ5u10kx6Z5Fa4maWlxml4g6dgRa72WajHlAAxMe2yOgppUBW99ATDYzsM0CUqZG4ieN8oLwlWwhpmjKVYBoBWjP/cbBEAo4Uajleaw4q20FY= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156269441541943.07574554951475; Tue, 9 Jul 2019 10:46:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A105A3086217; Tue, 9 Jul 2019 17:46:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 714585C69C; Tue, 9 Jul 2019 17:46:47 +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 27F671833002; Tue, 9 Jul 2019 17:46:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69Hkf7W031138 for ; Tue, 9 Jul 2019 13:46:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id BA2811001B1B; Tue, 9 Jul 2019 17:46:41 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F2701001B11; Tue, 9 Jul 2019 17:46:41 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:30 -0500 Message-Id: <20190709174638.17164-2-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 1/9] vbox: Add various vir*Flags API 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Tue, 09 Jul 2019 17:46:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Even though we don't accept any flags, it is unfriendly to callers that use the modern API to have to fall back to the flag-free API. Signed-off-by: Eric Blake --- src/vbox/vbox_common.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 54e31bec9d..44c98cadf6 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -553,7 +553,8 @@ static int vboxConnectClose(virConnectPtr conn) } static int -vboxDomainSave(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED) +vboxDomainSaveFlags(virDomainPtr dom, const char *path ATTRIBUTE_UNUSED, + const char *dxml, unsigned int flags) { vboxDriverPtr data =3D dom->conn->privateData; IConsole *console =3D NULL; @@ -564,6 +565,9 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTRI= BUTE_UNUSED) nsresult rc; int ret =3D -1; + virCheckFlags(0, -1); + virCheckNonNullArgReturn(dxml, -1); + if (!data->vboxObj) return ret; @@ -607,6 +611,12 @@ vboxDomainSave(virDomainPtr dom, const char *path ATTR= IBUTE_UNUSED) return ret; } +static int +vboxDomainSave(virDomainPtr dom, const char *path) +{ + return vboxDomainSaveFlags(dom, path, NULL, 0); +} + static int vboxConnectGetVersion(virConnectPtr conn, unsigned long *versio= n) { vboxDriverPtr data =3D conn->privateData; @@ -2717,7 +2727,8 @@ static char *vboxDomainGetOSType(virDomainPtr dom ATT= RIBUTE_UNUSED) { return osType; } -static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) +static int vboxDomainSetMemoryFlags(virDomainPtr dom, unsigned long memory, + unsigned int flags) { vboxDriverPtr data =3D dom->conn->privateData; IMachine *machine =3D NULL; @@ -2727,6 +2738,8 @@ static int vboxDomainSetMemory(virDomainPtr dom, unsi= gned long memory) nsresult rc; int ret =3D -1; + virCheckFlags(0, -1); + if (!data->vboxObj) return ret; @@ -2775,6 +2788,11 @@ static int vboxDomainSetMemory(virDomainPtr dom, uns= igned long memory) return ret; } +static int vboxDomainSetMemory(virDomainPtr dom, unsigned long memory) +{ + return vboxDomainSetMemoryFlags(dom, memory, 0); +} + static int vboxDomainGetInfo(virDomainPtr dom, virDomainInfoPtr info) { vboxDriverPtr data =3D dom->conn->privateData; @@ -7995,9 +8013,11 @@ static virHypervisorDriver vboxCommonDriver =3D { .domainDestroyFlags =3D vboxDomainDestroyFlags, /* 0.9.4 */ .domainGetOSType =3D vboxDomainGetOSType, /* 0.6.3 */ .domainSetMemory =3D vboxDomainSetMemory, /* 0.6.3 */ + .domainSetMemoryFlags =3D vboxDomainSetMemoryFlags, /* 5.6.0 */ .domainGetInfo =3D vboxDomainGetInfo, /* 0.6.3 */ .domainGetState =3D vboxDomainGetState, /* 0.9.2 */ .domainSave =3D vboxDomainSave, /* 0.6.3 */ + .domainSaveFlags =3D vboxDomainSaveFlags, /* 5.6.0 */ .domainSetVcpus =3D vboxDomainSetVcpus, /* 0.7.1 */ .domainSetVcpusFlags =3D vboxDomainSetVcpusFlags, /* 0.8.5 */ .domainGetVcpusFlags =3D vboxDomainGetVcpusFlags, /* 0.8.5 */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694422; cv=none; d=zoho.com; s=zohoarc; b=j/97IxENm4c0i4dfSiiJskzyDhWYOeLjBrRPitA7p0R5UOGzjJnvRHsJTQRAPGpq9dww/3/Cn8lmO/dJTFeMgPGeSHX79gJxo5Lzi75zn4zv17oMt7+kZ8YYC5XIOi0yiHoQInXwQxfZVCWHzuUxNhEooUtdUsyVEdqJ5Lx3/8Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694422; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=Gdvery4mQ6J2zOsPP31XoP6oOtOo0ZqfqO9plJ9KHQ0=; b=KS6Mnal4DpFvht/Z0+Hl2oaL0xSaq5BvoY93NC+Ma8yplA4UT9q4t7TQ/55Zc5S1Y1Ny09fYxuo0jyBHS78PaRla6A1VpdlFXOPBVESwSzYAEKWLxiRSTeUxVQSpq+8mHEofVeQKOBujdPLknE92AZQ5x7caF5iuij3cTWlQ+3Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 156269442209462.41603269601217; Tue, 9 Jul 2019 10:47:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32F0730C585A; Tue, 9 Jul 2019 17:47:00 +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 B35995C8AD; Tue, 9 Jul 2019 17:46:59 +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 6EB12206D5; Tue, 9 Jul 2019 17:46:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkgvB031143 for ; Tue, 9 Jul 2019 13:46:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id 4930B1001B1B; Tue, 9 Jul 2019 17:46:42 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id DF5381001E63; Tue, 9 Jul 2019 17:46:41 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:31 -0500 Message-Id: <20190709174638.17164-3-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 2/9] xenapi: Add various vir*Flags API 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 09 Jul 2019 17:47:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Even though we don't accept any flags, it is unfriendly to callers that use the modern API to have to fall back to the flag-free API. Signed-off-by: Eric Blake --- src/xenapi/xenapi_driver.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 672117822f..026acef680 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1184,19 +1184,21 @@ xenapiDomainSetVcpus(virDomainPtr dom, unsigned int= nvcpus) } /* - * xenapiDomainPinVcpu + * xenapiDomainPinVcpuFlags * * Dynamically change the real CPUs which can be allocated to a virtual CPU * Returns 0 on success or -1 in case of error */ static int -xenapiDomainPinVcpu(virDomainPtr dom, unsigned int vcpu ATTRIBUTE_UNUSED, - unsigned char *cpumap, int maplen) +xenapiDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu ATTRIBUTE_UNU= SED, + unsigned char *cpumap, int maplen, + unsigned int flags) { char *value =3D NULL; xen_vm vm; xen_vm_set *vms; xen_session *session =3D ((struct _xenapiPrivate *)(dom->conn->private= Data))->session; + virCheckFlags(0, -1); if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > = 0) { if (vms->size !=3D 1) { xenapiSessionErrorHandler(dom->conn, VIR_ERR_INTERNAL_ERROR, @@ -1225,6 +1227,19 @@ xenapiDomainPinVcpu(virDomainPtr dom, unsigned int v= cpu ATTRIBUTE_UNUSED, return -1; } +/* + * xenapiDomainPinVcpu + * + * Dynamically change the real CPUs which can be allocated to a virtual CPU + * Returns 0 on success or -1 in case of error + */ +static int +xenapiDomainPinVcpu(virDomainPtr dom, unsigned int vcpu, + unsigned char *cpumap, int maplen) +{ + return xenapiDomainPinVcpuFlags(dom, vcpu, cpumap, maplen, 0); +} + /* * xenapiDomainGetVcpus * @@ -2029,6 +2044,7 @@ static virHypervisorDriver xenapiHypervisorDriver =3D= { .domainSetVcpusFlags =3D xenapiDomainSetVcpusFlags, /* 0.8.5 */ .domainGetVcpusFlags =3D xenapiDomainGetVcpusFlags, /* 0.8.5 */ .domainPinVcpu =3D xenapiDomainPinVcpu, /* 0.8.0 */ + .domainPinVcpuFlags =3D xenapiDomainPinVcpuFlags, /* 5.6.0 */ .domainGetVcpus =3D xenapiDomainGetVcpus, /* 0.8.0 */ .domainGetMaxVcpus =3D xenapiDomainGetMaxVcpus, /* 0.8.0 */ .domainGetXMLDesc =3D xenapiDomainGetXMLDesc, /* 0.8.0 */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694415; cv=none; d=zoho.com; s=zohoarc; b=NGqS+aDrI9ZyGHfsoS4UueYJHEa7QEO3eClx66rRZsT/6RzUJbFvIG2tvZ1wt0oP4eP/8x9D2MLBttU3r2yPQRiyT6Q60J57rtMs3it4KVvokDMT9TRDJQMIz5Q9oE0ZMCQofMZZRmsQvsQRU1GNot4wXV8OTEPFa066hiz5Tno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694415; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=1vFxRRJ41s8VE6O/MNaB4oSIlIqVXEuXJTcMJEYFGig=; b=dH1y+KwqYW+n2T7UvlTNJSj7hqIas+8g8WpcAKwFiOkOdX/E4WV0gSgWQYQF56buNQunHB9QhDR7pLTm6DORaPaon7bDc2QOJo0vArNqUkzvSact+tWUizbue/tqsjduNFm4u53II5nlGNI5nntm0BkSXQa1Rk6IoZAJ7L4OBY4= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694415740472.26086395539005; Tue, 9 Jul 2019 10:46:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9D6772EED35; Tue, 9 Jul 2019 17:46:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F35D95B80B; Tue, 9 Jul 2019 17:46:46 +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 B7AC51833003; Tue, 9 Jul 2019 17:46:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkgZY031151 for ; Tue, 9 Jul 2019 13:46:42 -0400 Received: by smtp.corp.redhat.com (Postfix) id CA5221001B11; Tue, 9 Jul 2019 17:46:42 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DEAC1001B1B; Tue, 9 Jul 2019 17:46:42 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:32 -0500 Message-Id: <20190709174638.17164-4-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 3/9] maint: Enhance check-driverimpls.pl to check for API pairing 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 09 Jul 2019 17:46:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" As shown in recent patches, several drivers provided only an older counterpart of an API, making it harder to uniformly use the newer preferred API form. We can prevent future instances of this by enhancing 'make syntax-check' to flag any time a modern API is forgotten when an older API is present. It also flags if a modern API is provided without an old counterpart; but thankfully, that situation didn't flag, which gives us some room for future patches to confine the magic of API pairs to just src/libvirt*.c and the remote driver. Also, drop support for special-casing xenUnified, since 1dac5fbbbb0 dropped support for that naming scheme. --- src/check-driverimpls.pl | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/check-driverimpls.pl b/src/check-driverimpls.pl index b175e710f1..34273ddbba 100755 --- a/src/check-driverimpls.pl +++ b/src/check-driverimpls.pl @@ -23,14 +23,41 @@ use warnings; my $intable =3D 0; my $table; my $mainprefix; +my %apis; + +# API pairs where a driver should provide both or neither alternative. +my %pairs =3D ( + 'domainShutdown' =3D> 'domainShutdownFlags', + 'domainDestroy' =3D> 'domainDestroyFlags', + 'domainSetMemory' =3D> 'domainSetMemoryFlags', + 'domainSave' =3D> 'domainSaveFlags', + 'domainRestore' =3D> 'domainRestoreFlags', + 'domainSetVcpus' =3D> 'domainSetVcpusFlags', + 'domainPinVcpu' =3D> 'domainPinVcpuFlags', + 'domainCreate' =3D> 'domainCreateWithFlags', + 'domainDefineXML' =3D> 'domainDefineXMLFlags', + 'domainUndefine' =3D> 'domainUndefineFlags', + 'domainAttachDevice' =3D> 'domainAttachDeviceFlags', + 'domainDetachDevice' =3D> 'domainDetachDeviceFlags', + 'domainGetSchedulerParameters' =3D> 'domainGetSchedulerParametersFlags= ', + 'domainSetSchedulerParameters' =3D> 'domainSetSchedulerParametersFlags= ', + 'nodeDeviceDettach' =3D> 'nodeDeviceDetachFlags', +); my $status =3D 0; while (<>) { if ($intable) { if (/}/) { + while (my ($old, $new) =3D each %pairs) { + if (exists $apis{$old} !=3D exists $apis{$new}) { + print "$ARGV:$. Inconsistent paired API '$old' vs. '$n= ew'\n"; + $status =3D 1; + } + } $intable =3D 0; $table =3D undef; $mainprefix =3D undef; + %apis =3D (); } elsif (/\.(\w+)\s*=3D\s*(\w+),?/) { my $api =3D $1; my $impl =3D $2; @@ -39,9 +66,11 @@ while (<>) { next if $api eq "name"; next if $impl eq "NULL"; + $apis{$api} =3D 1; + my $suffix =3D $impl; my $prefix =3D $impl; - $prefix =3D~ s/^([a-z]+(?:Unified)?)(.*?)$/$1/; + $prefix =3D~ s/^([a-z]+)(.*?)$/$1/; if (defined $mainprefix) { if ($mainprefix ne $prefix) { @@ -53,7 +82,7 @@ while (<>) { } if ($api !~ /^$mainprefix/) { - $suffix =3D~ s/^[a-z]+(?:Unified)?//; + $suffix =3D~ s/^[a-z]+//; $suffix =3D~ s/^([A-Z]+)/lc $1/e; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694430; cv=none; d=zoho.com; s=zohoarc; b=ByRYLDyTgEdJtz6fuKGqTS7cdgMZukH1u9ImU4BxmuDHEVEyDAXjxhyRySRxbtn1N8calenSUsypT1Tny0N4KKFjOGCUdNsVoDCEJeBlQUKz3rsgltV8kJuIhxize1ViFjW7GKg31XzAwd5qRcDOwoypKPkborNK1cQmnCJ9Ry0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694430; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=v3uWo5qPZdljHOik0NnZgCdn127TJMx46kyUI0W170s=; b=F64mzQ13zrKyfnjXvSBpdPXMXrJMV5buLf0XS2iZQcHnxDUBJ2taCPz7gGfCOONzby37M5X2Hheln/d7VVT/Pf3pQpmyk9CoJ/wCLdCkOy+r8zaxpxvOo0bjzPVNWlq+i5PtcdRHsi3Fa7K/TfMnb3V+03PitjtOxPvhNPXZdmo= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694430900865.1558739403729; Tue, 9 Jul 2019 10:47:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 38DE03001C93; Tue, 9 Jul 2019 17:47:09 +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 0D5985C8AD; Tue, 9 Jul 2019 17:47:09 +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 BE0F4206DB; Tue, 9 Jul 2019 17:47:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkhZc031158 for ; Tue, 9 Jul 2019 13:46:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id 554961001E65; Tue, 9 Jul 2019 17:46:43 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id ED8911001E63; Tue, 9 Jul 2019 17:46:42 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:33 -0500 Message-Id: <20190709174638.17164-5-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 4/9] bhyve: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 09 Jul 2019 17:47:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/bhyve/bhyve_driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c index 4ce9ef0b95..84720e89e7 100644 --- a/src/bhyve/bhyve_driver.c +++ b/src/bhyve/bhyve_driver.c @@ -584,7 +584,11 @@ bhyveDomainUndefineFlags(virDomainPtr domain, unsigned= int flags) virDomainObjPtr vm; int ret =3D -1; - virCheckFlags(0, -1); + /* No managed save, so we explicitly reject + * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for + * bhyve, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); + if (!(vm =3D bhyveDomObjFromDomain(domain))) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694420; cv=none; d=zoho.com; s=zohoarc; b=cu+LZMnpV+UGdB5r4kiSYQRcmetTIbXKx365Cj6Fl1qHD+SvNteqRBByF2DWcOWdDHiVSEa2oGghf8n7P6Q9tKz+5TFj/Cbuckfo/tGLSarT2H4Fuz079F2+qi4N4VFeKSwFAZjSnCn7mPD48w4uvFa8owbvsxIg3tMPgxet8Q8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694420; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=vHjSHgJ0g/vNH6prxPalncVOSnM1mMZFrjoGgv3hqoc=; b=YzjBzvGuGfHcW1sJAdN/xbFesgre1gX1L3yapK+hxDHoNvu8H5f+Sld38Izs3VpPT6CxcLcadaoCpoxKnemekp62NNte2u1pOeAD7IFvpmMnl2RjUzVjbVux8R3er/q+Jh5n7YWI680bUcRHJD5EJ08rU9efjBeaq0J7sg0ULY8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694420993755.035413142286; Tue, 9 Jul 2019 10:47:00 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 4271F3079B9F; Tue, 9 Jul 2019 17:46:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A7165FCAC; Tue, 9 Jul 2019 17:46:58 +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 D340F1833008; Tue, 9 Jul 2019 17:46:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69Hkhog031163 for ; Tue, 9 Jul 2019 13:46:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id D68EE1001E6E; Tue, 9 Jul 2019 17:46:43 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A0191001E63; Tue, 9 Jul 2019 17:46:43 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:34 -0500 Message-Id: <20190709174638.17164-6-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 5/9] libxl: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 09 Jul 2019 17:46:59 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/libxl/libxl_driver.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 731700ded6..89959890c3 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2921,7 +2921,9 @@ libxlDomainUndefineFlags(virDomainPtr dom, char *name =3D NULL; int ret =3D -1; - virCheckFlags(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE, -1); + /* No snapshot support, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_MANAGED_SAVE | + VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); if (!(vm =3D libxlDomObjFromDomain(dom))) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694436; cv=none; d=zoho.com; s=zohoarc; b=jx5ccOWMMFuQyxdNNCTJMYwTMLgr75+RF4flIoVPv+mBWRqLt+9DfALgMqqeJyBT5j/DltgW4z1NIt6DhSjpuuLIK+MIEPBz2CXz0fkAyuZni790eMpzZQJrC+6J6b5apG2dBpJRZ9TaLjF7YVuziFmAktzUVU2cdiTwkYi3S4I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694436; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=yQ3Hr6eo2jswlfGOHrJXZ5486gLT1RvqNKeX/9iRE+8=; b=iezaAXpafcICBVWkNrBRXRVRyqhMy41pQCjMHMU0jLPo+kqd6ZLj8CNeMdZE7T4deUjowLqzQsCWbZuu71Hqc0GucXYEcaGn9KINOyyZz+V8Vt025ZD0bewv8Hpu/r7U7F3xice4QO2OOvyRfg/tW1XvzGmtWt1nXj+35HJHsV0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694436527454.53137294817225; Tue, 9 Jul 2019 10:47:16 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B68FC05FF80; Tue, 9 Jul 2019 17:47:15 +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 D4C9092D33; Tue, 9 Jul 2019 17:47:14 +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 95086206D5; Tue, 9 Jul 2019 17:47:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkimY031168 for ; Tue, 9 Jul 2019 13:46:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 61F031001E69; Tue, 9 Jul 2019 17:46:44 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 061981001E63; Tue, 9 Jul 2019 17:46:43 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:35 -0500 Message-Id: <20190709174638.17164-7-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 6/9] lxc: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 09 Jul 2019 17:47:15 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/lxc/lxc_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 9db2a02dee..a1bb29d5ae 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -491,7 +491,10 @@ static int lxcDomainUndefineFlags(virDomainPtr dom, int ret =3D -1; virLXCDriverConfigPtr cfg =3D virLXCDriverGetConfig(driver); - virCheckFlags(0, -1); + /* No managed save, so we explicitly reject + * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for + * lxc, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); if (!(vm =3D lxcDomObjFromDomain(dom))) goto cleanup; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694423; cv=none; d=zoho.com; s=zohoarc; b=JFHHdjsaCj4PjSouRsFFh7meBFXkzT/VSQnjEPJGZ7rwUHbKCWGB6jYvuNtlBf/WW66GKRVYYPnAxET6y5UL9anxovotD/Zek3gstvupMyf+ijZ2SDrP6WWF76r0XKhQ0uRS8JOU0qAJt/TPjIoP420e161EU6oFuNEKsWnD9UQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694423; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=FZ2HDpyMpIV8v2lT7UXmmyFWxaOvdQdPLBVZRqYRWd0=; b=DtPLt6P8sSKgKhaL+Wjvd5O8degcUhTynBWybfDbT7GJVPqL77em7CwS6lRCbjV8ymGdrFehDzUFvPc8dxY7+scIR84eJsVtQgmwxVL+LFXh4OeMh4CcMKcBaM18oBrlbAXzGxuo6HRKlDOHGFFq4um3qejnkGrf0quZEd8fEXA= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694422990576.2719746032809; Tue, 9 Jul 2019 10:47:02 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E5783162913; Tue, 9 Jul 2019 17:47:01 +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 DA5DA8703F; Tue, 9 Jul 2019 17:46:59 +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 A196B206D6; Tue, 9 Jul 2019 17:46:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkiKg031173 for ; Tue, 9 Jul 2019 13:46:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id E25341001E69; Tue, 9 Jul 2019 17:46:44 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 860901001E63; Tue, 9 Jul 2019 17:46:44 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:36 -0500 Message-Id: <20190709174638.17164-8-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 7/9] openvz: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Tue, 09 Jul 2019 17:47:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/openvz/openvz_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 39eeb2c12e..19c7db48ed 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -1126,7 +1126,10 @@ openvzDomainUndefineFlags(virDomainPtr dom, int ret =3D -1; int status; - virCheckFlags(0, -1); + /* No managed save, so we explicitly reject + * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for + * openvz, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); openvzDriverLock(driver); if (!(vm =3D openvzDomObjFromDomainLocked(driver, dom->uuid))) --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694448; cv=none; d=zoho.com; s=zohoarc; b=lXAy3zDBfyEm9h3mn81H+ItsnWBYBeLA/Zebbm98N5HbVmvMm5KYFLGqbi6grh9pdubjUySkecej13wIHfxy6JRQw2+8PHWuGVuDKnhtUkO8Dj/LjPYlySt0p2lRY+qF+wk2o9EwLUtyT5s8jSJ6aNTFzCC6oIXAjF21hV7UmEs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694448; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=KOGscdnLVK+ZtG+5tNjF20DJD3W9W1JX4LcTsfOsrUg=; b=gix1bwem/OfLOV4iaiZLhbFXbtx26rEQ0xLvX9mcXMckdKJIbDL4MStVis1NfUINqwN7bzGH9INxR0yGZsjZqFSsyo0RdId4t9c8Gny5WjQUt+bSKftmkF5rWeJgcCma4FJqDUSooFU8sSnIB64qleUKdByUVZiV8LWHvKBmmNE= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1562694448341597.0352852109078; Tue, 9 Jul 2019 10:47:28 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id BF3D9309264D; Tue, 9 Jul 2019 17:47:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 97A445CC08; Tue, 9 Jul 2019 17:47:21 +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 5ACB11833003; Tue, 9 Jul 2019 17:47:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkjSH031184 for ; Tue, 9 Jul 2019 13:46:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6F4CF1001B29; Tue, 9 Jul 2019 17:46:45 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 120AE1001DDB; Tue, 9 Jul 2019 17:46:44 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:37 -0500 Message-Id: <20190709174638.17164-9-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 8/9] vmware: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Tue, 09 Jul 2019 17:47:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/vmware/vmware_driver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index 1bc8a06c39..934378808d 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -776,7 +776,10 @@ vmwareDomainUndefineFlags(virDomainPtr dom, virDomainObjPtr vm; int ret =3D -1; - virCheckFlags(0, -1); + /* No managed save, so we explicitly reject + * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for + * vmware, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); vmwareDriverLock(driver); if (!(vm =3D vmwareDomObjFromDomainLocked(driver, dom->uuid))) --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 18 20:22:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1562694448; cv=none; d=zoho.com; s=zohoarc; b=C4YFaJNB6M09Sl0BxIlzXLZKPfvoqulLdP0khjAvAfMyW7smfhsiHxoVvtGznkaBdJYdd2XmeHHseefsX+7Una2x8RRjyjef+qQ8AD6OVXXYjZo33e3rshgFbqM4VKUMgwpO985Onj1YaoRPWjjdume3XFlP8p4bUdM7x70cwUg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1562694448; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=DX/7H9EM8UbzePpiANmuj/4Wxsc+Kb8JaKQ7w1JVko8=; b=kvB0wMJL4ogZVhd3+g5ei63Lzk5aCCu+9zOooOPTtFNud3XbdC+QMf5nV8teF2dchi3AprFke/U5Xt7A2CKhvqpm1Nmc4NqqvXNeobawRdd6u49XSiUOOgO43is6BSqVXOUavo/OXU+DbeuqNrWhC1BxP38hO1ko/sYhFgl86jI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15626944489531016.6632295196903; Tue, 9 Jul 2019 10:47:28 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 8471FF9E84; Tue, 9 Jul 2019 17:47:27 +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 593D65CC16; Tue, 9 Jul 2019 17:47:26 +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 02608206D9; Tue, 9 Jul 2019 17:47:26 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x69HkjwQ031193 for ; Tue, 9 Jul 2019 13:46:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id F021E1001B29; Tue, 9 Jul 2019 17:46:45 +0000 (UTC) Received: from blue.redhat.com (ovpn-116-78.phx2.redhat.com [10.3.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92F3A1001B11; Tue, 9 Jul 2019 17:46:45 +0000 (UTC) From: Eric Blake To: libvir-list@redhat.com Date: Tue, 9 Jul 2019 12:46:38 -0500 Message-Id: <20190709174638.17164-10-eblake@redhat.com> In-Reply-To: <20190709174638.17164-1-eblake@redhat.com> References: <20190709174638.17164-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH v2 9/9] xenapi: Ignore no-op flag during virDomainUndefine 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 09 Jul 2019 17:47:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Copy what esx does in ignoring the SNAPSHOTS_METADATA flag as a no-op, and in line with the recent doc tweak in commit c049f022. Signed-off-by: Eric Blake --- src/xenapi/xenapi_driver.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 026acef680..2cc6dbd22d 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1791,7 +1791,11 @@ xenapiDomainUndefineFlags(virDomainPtr dom, unsigned= int flags) struct xen_vm_set *vms; xen_vm vm; xen_session *session =3D ((struct _xenapiPrivate *)(dom->conn->private= Data))->session; - virCheckFlags(0, -1); + + /* No managed save, so we explicitly reject + * VIR_DOMAIN_UNDEFINE_MANAGED_SAVE. No snapshot metadata for + * xenapi, so we can trivially ignore that flag. */ + virCheckFlags(VIR_DOMAIN_UNDEFINE_SNAPSHOTS_METADATA, -1); if (xen_vm_get_by_name_label(session, &vms, dom->name) && vms->size > = 0) { if (vms->size !=3D 1) { --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list