- build: Bump minimum glib2 version to 2.66.0 (RHEL-76802) - qemuProcessHandleIOError: Refactor to extract 'priv' instead of 'driver' (RHEL-76802) - qemu: Handle quirks of 'device' field of BLOCK_IO_ERROR event in monitor code (RHEL-76802) - qemu: Rename 'diskAlias' to 'device' in qemu IO error event handling (RHEL-76802) - qemuProcessHandleIOError: Rename local variables (RHEL-76802) - qemuMonitorJSONHandleIOError: Do not munge 'reason' field of IO error event (RHEL-76802) - qemuProcessHandleIOError: Prefer lookup by node name (RHEL-76802) - qemuMonitorJSONHandleIOError: Propagate new 'qom-path' field (RHEL-76802) - virStorageSource: Add fields for storing last I/O error message (RHEL-76802) - qemuProcessHandleIOError: Populate I/O error reason to virStorageSource (RHEL-76802) - qemuProcessHandleIOError: Log IO errors in the VM log file (RHEL-76802) - libxlDomainGetMessages: Add existing flags to 'virCheckFlags' (RHEL-76802) - virDomainObjGetMessages: Refactor using GPtrArray (RHEL-76802) - virDomainGetMessages: Introduce VIR_DOMAIN_MESSAGE_IOERRORS (RHEL-76802) - include: libvirt-domain: Reword documentation for @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON (RHEL-76802) - include: libvirt-domain: Add 'message' @reason of VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON (RHEL-76802) - qemuSnapshotForEachQcow2: Don't initialize 'nrollback' (RHEL-78186) - qemu: process: Export qemuPrepareNVRAM for use in snapshot code (RHEL-78186) - qemu: snapshot: Ensure that NVRAM image exists when taking inactive internal snapshot (RHEL-78186) - qemuxmlconftest: Allow testing of the 'writable' flag for passed FDs for disks (RHEL-78353) - qemuxmlconftest: Add testing of FDs with 'writable' flag in 'disk-source-fd' (RHEL-78353) - qemu: domain: Initialize FD passthrough for a virStorageSource before using it (RHEL-78353) Resolves: RHEL-76802, RHEL-78186, RHEL-78353
65 lines
2.0 KiB
Diff
65 lines
2.0 KiB
Diff
From 036c41c36b59f7ac41228701097c2b0ae6b03053 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <036c41c36b59f7ac41228701097c2b0ae6b03053.1738937224.git.jdenemar@redhat.com>
|
|
From: Peter Krempa <pkrempa@redhat.com>
|
|
Date: Fri, 24 Jan 2025 17:17:51 +0100
|
|
Subject: [PATCH] qemuProcessHandleIOError: Prefer lookup by node name
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
When qemu reports a node name for an I/O error we should prefer the
|
|
lookup by node name instead as it gives us the path to the specific
|
|
image which caused the error instead of the top level image path.
|
|
|
|
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
|
|
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
|
|
(cherry picked from commit 784538a470fe346cb1ab85786b8ece85cbe7ff9f)
|
|
|
|
https://issues.redhat.com/browse/RHEL-76802
|
|
---
|
|
src/qemu/qemu_process.c | 22 +++++++++++++---------
|
|
1 file changed, 13 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
|
|
index 9ae39c0379..b0a20328d4 100644
|
|
--- a/src/qemu/qemu_process.c
|
|
+++ b/src/qemu/qemu_process.c
|
|
@@ -837,22 +837,26 @@ qemuProcessHandleIOError(qemuMonitor *mon G_GNUC_UNUSED,
|
|
const char *eventPath = "";
|
|
const char *eventAlias = "";
|
|
const char *eventReason = "";
|
|
- virDomainDiskDef *disk;
|
|
+ virDomainDiskDef *disk = NULL;
|
|
+ virStorageSource *src = NULL;
|
|
|
|
virObjectLock(vm);
|
|
priv = QEMU_DOMAIN_PRIVATE(vm);
|
|
|
|
- if (device)
|
|
+ if (nodename)
|
|
+ disk = qemuDomainDiskLookupByNodename(vm->def, priv->backup, nodename, &src);
|
|
+
|
|
+ if (!disk)
|
|
disk = qemuProcessFindDomainDiskByAliasOrQOM(vm, device, NULL);
|
|
- else if (nodename)
|
|
- disk = qemuDomainDiskLookupByNodename(vm->def, NULL, nodename, NULL);
|
|
- else
|
|
- disk = NULL;
|
|
|
|
- if (disk) {
|
|
- eventPath = virDomainDiskGetSource(disk);
|
|
+ if (!src && disk)
|
|
+ src = disk->src;
|
|
+
|
|
+ if (disk)
|
|
eventAlias = disk->info.alias;
|
|
- }
|
|
+
|
|
+ if (src && src->path)
|
|
+ eventPath = src->path;
|
|
|
|
if (nospace)
|
|
eventReason = "enospc";
|
|
--
|
|
2.48.1
|