From nobody Wed Mar 12 17:57:01 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1741215480; cv=none; d=zohomail.com; s=zohoarc; b=gi9RjscBKyUp99h782WHeU/jMPTOm05fHptYan7KsRQC4sodOVyEHMkIVMjpq6Y4BnLSdn+r9w26ATof1xvxO0BSwO7dpkc3OlVzv7jSL47LoH3srcQ7s6U1aDarSTgw/ccO0Dl7rklIa4uGAf/IhZRiX/TCTAhhZBfI/uYQaWM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741215480; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=LFNQ0gmYqf6JMK2y/f/Fob8WGOq0ililgRkTdSbnCVc=; b=Gddygd3xiv5c5ayDFOPzppPNWRQt7jBegEkw8TqIsQCQ1E6qo58yJuFN20tb3PkW6m77tYSYkTYZ2aVf3JSZ0+j/1D9p1KwTF5c5H6HQ7L66ZdX3i95Dic9AEHBwyGjMq7qLCBMIdQfH/0l00/NhIprBK3mj5L8yB2hy2HzcdN8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1741215480219586.6678996602863; Wed, 5 Mar 2025 14:58:00 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 239F517DA; Wed, 5 Mar 2025 17:57:59 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 6AD2315A3; Wed, 5 Mar 2025 17:51:01 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9C0561755; Wed, 5 Mar 2025 17:50:45 -0500 (EST) Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CE84E14F8 for ; Wed, 5 Mar 2025 17:50:27 -0500 (EST) Received: by mail-ed1-f42.google.com with SMTP id 4fb4d7f45d1cf-5e5b572e45cso1595770a12.0 for ; Wed, 05 Mar 2025 14:50:27 -0800 (PST) Received: from localhost (205-201-32-8.scinternet.net. [205.201.32.8]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-7365ff1668dsm6230524b3a.59.2025.03.05.14.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Mar 2025 14:50:26 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1741215027; x=1741819827; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MDOxbYy+285ueS60uvUl2NwtlZxHafRwl+/HUUSirQ8=; b=F6ZaIGYjTZy6vlmVFTERmRqfq41A+DQaaG/3K4eQKXn0DlBSszuejldBXcgZ3kmKZk r8lzy18IaBwehg8UNTmj55UbcYj4/sJ/olliADU3Zi/eOXqf/VOaGbsAXP/PXMcyRMgH SCTvpYAONqc147WzjHxKMq2JQNlh5lCFFBV3i52uc5vCduYHGKMfvVAh4oYdRr7A5yeO GNh3G/9FvV4AEMwK0/wAGsUdHDOT5U5LRmSe+EUkBifKRTZRsjt0+WczHFDtbC4/Qlam KjNwWLyNR8QgkjNe9lgBK95IiU6feh8X2zUArxcJxFyFYMfzR3fJJjWTS3vGPxdiE1tN zvxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741215027; x=1741819827; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MDOxbYy+285ueS60uvUl2NwtlZxHafRwl+/HUUSirQ8=; b=VFkHENPnMy5CLFWY2FPB6r+OVbnc5uHvPMSWIw2idI55FEOr6Sk/wuxHjSCMSa7d62 cXgkfKO1A8ZTNyXAFIs2xaIOK6BD1u9oa4XGVXdmhy5K/2/i/ZXqCcHHjlUaYW8yzyXo LbRIvCSRjZU0PeEKZuugvmwNF0629tkxyRJuGYQkPP/kwkoxlxlcHXYItPDDLuJ0cIop u/fIG2b35BKoa+KCyTbs/DDL9tUi7rzaiEK98yRhD+Ko0JdEx6HR1Wji0agRY7zYaq48 8wy6hcRguxIpi42BCAL+qZ23x3rlUWEq8c9vhQe8qtskTug3aDY/7dGnTNVeZreEgNTo o4Ig== X-Gm-Message-State: AOJu0YwMAAH7MfwSBMGPAv0nX0MYTvYYopbMxLPLRRY+/+AG0GojFgYD pbWSUZszcGrAohZAVdJn+j2LDICb0v25vYflZp5GTIn+xD58ttKNqZsu2txcNNrCbsBFfgvAd0a H X-Gm-Gg: ASbGnctMKG9VvjJjYhmw09VqdUphrz/TtcFMhm5RC862QR0o4SOJzBp+G1FwMV7KjAI gTzFgB+U48k69r6vgZXOSz5hpdVslRWhgAz30C8/uGsUbSAt4kEXU6bLhPCLYYej5zvy8YFPhzw yx/KO7yKdWQgD9PnFEn3UklYpQaoAbzJ1Vm71WNAocttlu8om5zSTpBAZJtxwpZKv4bVUsaTLkG uM2OPf61w18OlflSeyRDUySdDzqisxtNhtwN2QTpwMpmokBuamIFrTHlOeez+0YLDFvahjAgNtQ 0Nk+daA1TGCydq72wqylwxp1toXn8IGPHVRBp9lPXYqOliXxi3pONQhH5q5YPo0= X-Google-Smtp-Source: AGHT+IEcJUJFY3xmGpRpdYe9Ou1v4e1OpkB+auxFs+oBuHOinDPzZR+eIKsTylBk4pYa9Hyd5894/A== X-Received: by 2002:a05:6402:4305:b0:5dc:63d:b0c1 with SMTP id 4fb4d7f45d1cf-5e59f486e1fmr5128287a12.29.1741215026649; Wed, 05 Mar 2025 14:50:26 -0800 (PST) To: devel@lists.libvirt.org Subject: [PATCH V4 15/18] include: Define constants for parallel save/restore Date: Wed, 5 Mar 2025 15:48:24 -0700 Message-ID: <20250305224957.5369-16-jfehlig@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250305224957.5369-1-jfehlig@suse.com> References: <20250305224957.5369-1-jfehlig@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 72JPQCZJIB5EYTXSSNBWHUDPBG56ZHSV X-Message-ID-Hash: 72JPQCZJIB5EYTXSSNBWHUDPBG56ZHSV X-MailFrom: jfehlig@suse.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: farosas@suse.de, Claudio Fontana X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Jim Fehlig via Devel Reply-To: Jim Fehlig X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1741215481840019100 Content-Type: text/plain; charset="utf-8" From: Claudio Fontana Add a new VIR_DOMAIN_SAVE_PARALLEL flag to the save and restore APIs, which can be used to specify the use of multiple, parallel channels for saving and restoring a domain. The number of parallel channels can be set using the VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS typed parameter. Signed-off-by: Claudio Fontana Signed-off-by: Jim Fehlig --- include/libvirt/libvirt-domain.h | 11 +++++++++++ src/libvirt-domain.c | 3 +++ 2 files changed, 14 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 0121620e9c..7f1a2003c0 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1655,6 +1655,7 @@ typedef enum { VIR_DOMAIN_SAVE_RUNNING =3D 1 << 1, /* Favor running over paused = (Since: 0.9.5) */ VIR_DOMAIN_SAVE_PAUSED =3D 1 << 2, /* Favor paused over running = (Since: 0.9.5) */ VIR_DOMAIN_SAVE_RESET_NVRAM =3D 1 << 3, /* Re-initialize NVRAM from t= emplate (Since: 8.1.0) */ + VIR_DOMAIN_SAVE_PARALLEL =3D 1 << 4, /* Save and restore using par= allel channels (Since: 10.6.0) */ } virDomainSaveRestoreFlags; =20 int virDomainSave (virDomainPtr domain, @@ -1712,6 +1713,16 @@ int virDomainRestoreParams (vir= ConnectPtr conn, */ # define VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT "image_format" =20 +/* + * VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS: + * + * an optional parameter used to specify the number of IO channels to use + * during parallel save. As VIR_TYPED_PARAM_INT. + * + * Since: 11.2.0 + */ +# define VIR_DOMAIN_SAVE_PARAM_PARALLEL_CHANNELS "parallel.channels" + =20 /* See below for virDomainSaveImageXMLFlags */ char * virDomainSaveImageGetXMLDesc (virConnectPtr conn, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 0ee7c6f45b..d0c1b6c037 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -1225,6 +1225,9 @@ virDomainRestoreFlags(virConnectPtr conn, const char = *from, const char *dxml, * now, VIR_DOMAIN_SAVE_PARAM_FILE is required but this requirement may * be lifted in the future. * + * See VIR_DOMAIN_SAVE_PARAM_* for detailed description of accepted + * restore parameters. + * * Returns 0 in case of success and -1 in case of failure. * * Since: 8.4.0 --=20 2.43.0