From nobody Fri Dec 19 20:44:51 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=1740097566; cv=none; d=zohomail.com; s=zohoarc; b=lH4aP2VRTv5RjqP4LrsUqWVxCR3j4WXTsc6IhE5rRyxkUJvtk3a0JgCXicNsWzfdkzsBNiMX+GiBSMWRdlMWAEZISpuweNjcciENnoIOrS+rGPdvZuidQYo5Bd8VnQSdgZvCyHA5uPo0UpzqpKB74d5BRppbg7pYuhrMzeq1M1w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1740097566; h=Content-Type: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=PMCUZuPGXIP9oPrO2ME2N4ry0RKPfkZbvG3SuPtB4D8=; b=EM6n/4Trqwt5FdALWwVdC+XWYrzHaA9V1lG2PuXVvOHmYNsNwGXJIe2lsR90QYqPFPrsuCugTT6NIUO4fLI+wtm91yJXe6noxcg6SrLT6KSrxY2aGOgBH488ZThqLY90oZHhjoeOzffgBfik/hiDfaie0d/aQQ9V6DR44YZsdrM= 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 174009756652060.87602151058445; Thu, 20 Feb 2025 16:26:06 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id DE37E22C9; Thu, 20 Feb 2025 19:26:05 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id C43F316EF; Thu, 20 Feb 2025 19:25:31 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 534FC80F; Thu, 20 Feb 2025 19:25:26 -0500 (EST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 A8F0E96E for ; Thu, 20 Feb 2025 19:25:25 -0500 (EST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4393dc02b78so10735335e9.3 for ; Thu, 20 Feb 2025 16:25:25 -0800 (PST) Received: from localhost (75-169-8-111.slkc.qwest.net. [75.169.8.111]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-add0e439774sm11197909a12.0.2025.02.20.16.25.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2025 16:25:24 -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=1740097525; x=1740702325; 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=mDmWjXqNpQnkkHD0DEBRcm45Dfi8fMvqj69acB0I9MA=; b=JW3Qbi6251+9uVy+BzChstu3K8JR5EPWHz6hLX0l4FbItc2ExmmAUmrHApOa/41OoA 1wa86ZA5BDyD+e9MORKyXoTr00MWPYypAzIzawuyEG9h+UGPRie8XLQbbO8QS0eznDKx 33eCQ/x98SHg1QH3clhQ8XNFHMZAcHLhzbQFC6xjMWsHhSYJ14Ir1kEdspInGnDAXXcz yNU8UP/zC0RtL3DWClFC797fe/UiicAlt1smyejSG4dZkDr2ldrUa87j3zNHClfW4z0i iMzb462uWqrxh5k9iq26RlfkPhoWzrX7MeYtkY8x8ABlRv+Tz9Nb97vWlhNomHYgNe0s 6TJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740097525; x=1740702325; 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=mDmWjXqNpQnkkHD0DEBRcm45Dfi8fMvqj69acB0I9MA=; b=vC6f0vfX9MHUcSYECZ1EBKM8ILDoWNTmH6MZFPcCOWvTsyXtcF+ZZQJp522X2m+gIR y55fSfH2v17wzE+ddCWE6kzlPDlWJeiEjhf5DUWA2Ck/kRZ9TcoGXELVA+MUhVZToyaX c8T3hzB9FRnW71KeAtHd0ziUPOF25wIdnbfVYVrX7yMDIOOAEzUXlpcvmVlL3grYrFah VSDPdJGnNc2aFi6aoSdzGevpw2Ms6ksFqZcIjdx5fLxAQUZctBMTtTjweH8QtecaM+9r puR9mLGI256Ori47hIBTWsmeyTPc+HLPlbddzxDR4tfTzuJs26qSFobjNtepBJ+ySirs e7Jg== X-Gm-Message-State: AOJu0YxWhzQhiO7lJneQPpgm6zI+7OSfKI8CH536SgykVWoHoRx0Orbe otfmf3chSC/A8i1vs4UO/mV9EWAV/HP6ft4XktZishAwbqZ6v+0MYARSXxSZ9TbPi1NZ7s6hvnD 4 X-Gm-Gg: ASbGncu6jPATQMPTN3aJ2xXrMkNOG6FtV4uuV1Ebkoe5YZjRULfjemAdvdNbqvz+byr X9oE2E5uXHn6fRsh2CSk9uMu0aAlOxKe2+tIxSSEsIyWpPO5GEtALkvOQTRpIeGPbreuSOn390N uYgx2Y9brpcBNUV1iRci9KpQqhW4nHN4bwKPCjg4v1ZTrpMhO7IKvzVKjN9nXpy3vrLbp8dv6jx ZbfHVhDhGtCGnZCHSA+Z7XvOk5C/XDx00Ybae5P5Y4iyKyEvr1Ah3JZwWeAY5UP4josY5XE3HmF vjVqA7DDu3waAa/Ue3QVeFoe7MrjE0iJnQ== X-Google-Smtp-Source: AGHT+IEg17yG/r6xKXprAojk/A2Vq9AE5C3tCEaHbbRRvs3yKBL/8WiO/yv9lk+krOAHfY/k9On2Rg== X-Received: by 2002:a05:6000:154c:b0:38f:579f:de15 with SMTP id ffacd0b85a97d-38f6e947089mr1220262f8f.14.1740097524627; Thu, 20 Feb 2025 16:25:24 -0800 (PST) To: devel@lists.libvirt.org Cc: =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [PATCH V2 1/2] include: Define constant for save image format Date: Thu, 20 Feb 2025 17:23:53 -0700 Message-ID: <20250221002521.9901-2-jfehlig@suse.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250221002521.9901-1-jfehlig@suse.com> References: <20250221002521.9901-1-jfehlig@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YOM4HJOXHKII63K6TNUHSHO2GUC3NXXK X-Message-ID-Hash: YOM4HJOXHKII63K6TNUHSHO2GUC3NXXK 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: 1740097568049019000 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