From nobody Tue Sep 9 03:19:43 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=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1737736419561782.0619936237728; Fri, 24 Jan 2025 08:33:39 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id 9012F1556; Fri, 24 Jan 2025 11:33:38 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 94B37156E; Fri, 24 Jan 2025 11:33:21 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id 7438412D5; Fri, 24 Jan 2025 11:33:18 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 F34DF12B0 for ; Fri, 24 Jan 2025 11:33:17 -0500 (EST) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-458-XyZ-AuS7Ptyu3I6mz1rtBQ-1; Fri, 24 Jan 2025 11:33:16 -0500 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D6DC91B9BF39 for ; Fri, 24 Jan 2025 16:33:14 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.2]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 095D71800358 for ; Fri, 24 Jan 2025 16:33:13 +0000 (UTC) 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, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737736397; h=from:from: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; bh=Zc+tB4R6TEX4nh+/o+OmzaxPCMkAz5okaOUYatA41xY=; b=gxTnKdZhMgzSTodLXvFcTvZiAZHY7xZteWo2/6d1s2V4PZbaFXksmRb/hrHMazf/HmqWUv BDw5ehxCuuBhfuL6nu5aVIMlxSrCkyZi4EJHCXlm5xhbXK5mG+kD0Ps/3CjaFSwdCH8eX3 sIW6VF71CC86ig5Ox5soEgXffHoGZgs= X-MC-Unique: XyZ-AuS7Ptyu3I6mz1rtBQ-1 X-Mimecast-MFC-AGG-ID: XyZ-AuS7Ptyu3I6mz1rtBQ From: Peter Krempa To: devel@lists.libvirt.org Subject: [PATCH 3/5] API: Document more possibilities for @reason field of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON event Date: Fri, 24 Jan 2025 17:33:04 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: KVh0E_s3lHvKxiqJQ0-99mDDUvJJhIRF251Jy-sJeVw_1737736395 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: UZOOYGP2SHRVIA7FDG5XUW55A7AJFGC6 X-Message-ID-Hash: UZOOYGP2SHRVIA7FDG5XUW55A7AJFGC6 X-MailFrom: pkrempa@redhat.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: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1737736421831019100 Content-Type: text/plain; charset="utf-8" The VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON event allows @reason to be reported to the user, but currently we only report 'enospc'. Extend the documentation so that we allow the passthrough of the verbatim error, prefixed by 'other: ' in order to prevent collisions and note that users must not attempt to parse them. Signed-off-by: Peter Krempa --- include/libvirt/libvirt-domain.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 2a4b81f4df..e031b23547 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -4790,8 +4790,12 @@ typedef void (*virConnectDomainEventIOErrorCallback)= (virConnectPtr conn, * If the I/O error is known to be caused by an ENOSPC condition in * the host (where resizing the disk to be larger will allow the guest * to be resumed as if nothing happened), @reason will be "enospc". - * Otherwise, @reason will be "", although future strings may be added - * if determination of other error types becomes possible. + * + * Otherwise, if the hypervisor reported an error @reason will be the verb= atim + * error message from hypervisor prefixed by "other: ". Note that this err= or + * may not be stable and thus is only really usable for human use. In case + * when the hypervisor doesn't report the error @reason will be an empty s= tring + * "". * * Since: 0.8.1 */ --=20 2.48.1