qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] block-backend: Fix argument order when calling 'qapi_event_s


From: Kevin Wolf
Subject: Re: [PATCH] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'
Date: Mon, 27 Jan 2025 15:59:50 +0100

Am 27.01.2025 um 11:29 hat Peter Krempa geschrieben:
> Commit 7452162adec25c10 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).
> 
> Fixes: 7452162adec25c1003d5bf0079aca52913a80e0c
> Signed-off-by: Peter Krempa <pkrempa@redhat.com>

Thanks, applied to the block branch after resolving a merge conflict
with:

    block: Fix leak in send_qmp_error_event
    https://lists.gnu.org/archive/html/qemu-block/2024-11/msg00258.html

Both patches are trivial, so I'm reasonably confident I got this one
right. :-)

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]