Skip to content

Commit 107c551

Browse files
pipokevmw
authored andcommitted
block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'
Commit 7452162 introduced 'qom-path' argument to BLOCK_IO_ERROR event but when the event is instantiated in 'send_qmp_error_event()' the arguments for 'device' and 'qom_path' in qapi_event_send_block_io_error() were reversed : Generated code for sending event: void qapi_event_send_block_io_error(const char *qom_path, const char *device, const char *node_name, IoOperationType operation, [...] Call inside send_qmp_error_event(): qapi_event_send_block_io_error(blk_name(blk), blk_get_attached_dev_path(blk), bs ? bdrv_get_node_name(bs) : NULL, optype, [...] This results into reporting the QOM path as the device alias and vice versa which in turn breaks libvirt, which expects the device alias being either a valid alias or empty (which would make libvirt do the lookup by node-name instead). Cc: [email protected] Fixes: 7452162 ("qapi: add qom-path to BLOCK_IO_ERROR event") Signed-off-by: Peter Krempa <[email protected]> Message-ID: <09728d784888b38d7a8f09ee5e9e9c542c875e1e.1737973614.git.pkrempa@redhat.com> Reviewed-by: Daniel P. Berrangé <[email protected]> Reviewed-by: Kevin Wolf <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
1 parent 772f868 commit 107c551

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/block-backend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ static void send_qmp_error_event(BlockBackend *blk,
21412141
g_autofree char *path = blk_get_attached_dev_path(blk);
21422142

21432143
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
2144-
qapi_event_send_block_io_error(blk_name(blk), path,
2144+
qapi_event_send_block_io_error(path, blk_name(blk),
21452145
bs ? bdrv_get_node_name(bs) : NULL, optype,
21462146
action, blk_iostatus_is_enabled(blk),
21472147
error == ENOSPC, strerror(error));

0 commit comments

Comments
 (0)