From nobody Fri Dec 19 20:15:40 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=1739589328; cv=none; d=zohomail.com; s=zohoarc; b=OKIIWAEvhLTqKhIsh/Z6jGaE7Anb6g11FmVoafCy9OMboo9s9mgCiCnfoArIQnrmMWYUgvnQgISPSzZxUL9Ejya+VS8PvtEp+kGF9mQVMTndST/2WDn/MNGNAPLmQmCWVBXJzY1X2GUw8WshPcb3SC4jKx/erxIu7ByooVtE/i0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739589328; h=Content-Transfer-Encoding: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:Cc; bh=DywdFrESx9bVMVnca9wrWhgEJaPL5x2GPrLMl7pPj90=; b=P0ZPDzzBwCGzCCGxGCZc2HRyo+7V9O9eMJLjjeWQUufa0JvLskUzSMtGkIcqywEbHITfwYm88FsfqnK+e9q2Gr7ue7WYsQIOvEmuoKra6xej0km6i+8v/jNfkLN7rQaxxmldipCZ1qmQOU2AoZTlkIrl5o8d9un80ru8rHRNQmo= 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 1739589328958242.38285962753685; Fri, 14 Feb 2025 19:15:28 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 4C4261D21; Fri, 14 Feb 2025 22:15:28 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id E2CD81BFD; Fri, 14 Feb 2025 22:14:55 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 26D831BB1; Fri, 14 Feb 2025 22:14:50 -0500 (EST) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 8DC9519A5 for ; Fri, 14 Feb 2025 22:14:49 -0500 (EST) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-38f32c1c787so441074f8f.1 for ; Fri, 14 Feb 2025 19:14:49 -0800 (PST) Received: from localhost (75-169-8-111.slkc.qwest.net. [75.169.8.111]) by smtp.gmail.com with UTF8SMTPSA id 98e67ed59e1d1-2fc13ab1000sm3860746a91.9.2025.02.14.19.14.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Feb 2025 19:14:48 -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=1739589288; x=1740194088; darn=lists.libvirt.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=TnBMXpt9KuUbi1fsdJjOy0Y32P0DqqSDu/yxUeRHOaI=; b=bSxg+pHnW1UXBwAUo5juxqlhDECgvjj15pLfVvjeaWnQptemCDQO/ljC0SdnzJJQBp ZlCzB4tmZyYCCF/Ox044my/BmNlZx89JTe/7sQkXGDVL1xyY6ovcQVXf/wmOHOVGhBSi rsAE+zViB3Hcit2fNU1hUKyv0Prx441Jj0kIMDsWFLJTp/QXWAX/fAIFbtU0dvILbdwZ Poe5sdBUMJJrhHtHgj0dE9KB2wBWv7Pi1AItgeoQpx3Rm3UeBCrQzuyOWsQ91hspeKQM PHLhtjOnzmVLVyxme06vHwH1TxfZKLQOfXEpvu3Xt3j4TUMYJvDomXqJR+tJRFS+zK81 7hxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739589288; x=1740194088; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TnBMXpt9KuUbi1fsdJjOy0Y32P0DqqSDu/yxUeRHOaI=; b=ujEz6uYtCbWcpaUQBr/xEj+SLyBdgWMvOF6X2qC81re5lyA+goSos6/3scyCk8C6YM IMnbVhgtoaacfYbFWweM/PmMXW7PPY+7hpyF3f9G/Q8kfc1lL13XsvQOcaR5lRdUJNTr tLH9N7ezsfKZXyBF5U8kGnqzNSNX18tveiyhPLGp+AGfUtGyLv3/yw3uu74fPkwcKald hPzcUw1w21FFxl1VyuuopaqQQvdoQXeB9K0MbgP9lQ23zAfVzg+gRcpiP61FxLghP2Lj PGUk7MI3SKXsuDH0+kTLmBv2ZfLtYDsF7UatbhGSvYuCh/Us3tvOUlJq2ipOxfukyi+/ ujPg== X-Gm-Message-State: AOJu0Yzjnb/U71KwQ8ZcK6xBFX0SOnmobMoVEoU2lTziHjr0yxq6oOBz kxrBjHMe1V3+vCnCThZJkTFTdcthkNQeEyWKL9RmUp063ZfE128xCPGXwYZIJt/fo4U922Z4vT+ / X-Gm-Gg: ASbGncss70SOmohrL+UXCpfQGy4zkWzq5/zVg5xFAFX4GvcGoNK6Us4vCNV7DMKnkhp 2GY7FPwpp0Ao2f4V1l/lpNKA97oRWP018NYPymmkymIuIXr+qHqkFViEKjStaK5vK+6glcY0EOb 9CuGifZiipUt2Q2oO/gz1qWyKYB4zO6wpG4j6yny6Wjm9ECW1t2xr00VkZhskowtr+y9zVkYhOC 8ljWbxkAUjxlaQm34JVV9JR6q/g1b0DbPW/XlWdzKnXWJaHBrCfjbejYp5VO3sx7P9c95lfi/FX dZ4OkFrGsUs8f25dci+moKOMbnE4KBYPwg== X-Google-Smtp-Source: AGHT+IEvDR2i/pUUwEbJrsrbzq0WN55uKbFuS4Ya56nY7nlBgbzxyw56HOi/LiWx8mRQgCbCMxEUnw== X-Received: by 2002:a05:6000:1a87:b0:38d:e12e:5d95 with SMTP id ffacd0b85a97d-38f33f53ff1mr1326130f8f.47.1739589288445; Fri, 14 Feb 2025 19:14:48 -0800 (PST) To: devel@lists.libvirt.org Subject: [PATCH 1/2] include: Define constant for save image format Date: Fri, 14 Feb 2025 20:03:09 -0700 Message-ID: <20250215031444.23337-2-jfehlig@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250215031444.23337-1-jfehlig@suse.com> References: <20250215031444.23337-1-jfehlig@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: Q7VMP53KDMCNLF3KPY7VKPNDYJT2O5TN X-Message-ID-Hash: Q7VMP53KDMCNLF3KPY7VKPNDYJT2O5TN 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 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: 1739589329416019000 Content-Type: text/plain; charset="utf-8" Add a new VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT typed parameter for specifying the save image format. A format specified via the virDomainSaveParams API overrides the save_image_format setting in qemu.conf. The 'raw' format remains the default. Signed-off-by: Jim Fehlig Reviewed-by: Daniel P. Berrang=C3=A9 --- include/libvirt/libvirt-domain.h | 13 +++++++++++++ src/libvirt-domain.c | 3 +++ 2 files changed, 16 insertions(+) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index f5420bca6e..b5f2f8a31c 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -1700,6 +1700,19 @@ int virDomainRestoreParams (vir= ConnectPtr conn, */ # define VIR_DOMAIN_SAVE_PARAM_DXML "dxml" =20 +/** + * VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT: + * + * an optional parameter used to specify the format of the save image. + * Valid formats are raw, zstd, lzop, gzip, bzip2, and xz. If not + * specified, the save_image_format setting in qemu.conf is used, which + * defaults to raw. As VIR_TYPED_PARAM_STRING. + * + * Since: 11.1.0 + */ +# define VIR_DOMAIN_SAVE_PARAM_IMAGE_FORMAT "image_format" + + /* See below for virDomainSaveImageXMLFlags */ char * virDomainSaveImageGetXMLDesc (virConnectPtr conn, const char *file, diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 072cc32255..4e38d4c868 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-domain.c @@ -1010,6 +1010,9 @@ virDomainSaveFlags(virDomainPtr domain, const char *t= o, * If VIR_DOMAIN_SAVE_PARAM_FILE is not provided then a managed save is * performed (see virDomainManagedSave). * + * See VIR_DOMAIN_SAVE_PARAM_* for detailed description of accepted save + * parameters. + * * Returns 0 in case of success and -1 in case of failure. * * Since: 8.4.0 --=20 2.43.0