]> git.ipfire.org Git - thirdparty/qemu.git/commit
block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'
authorPeter Krempa <pkrempa@redhat.com>
Mon, 27 Jan 2025 10:29:24 +0000 (11:29 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 11 Feb 2025 06:18:58 +0000 (09:18 +0300)
commit37ff07ea126f46aee04633cb640071db0b9016ce
tree4b9c34400b5f6d75ccdcc8945aa0cdd6d7fa6f32
parentd7b8b07197e8ba172e5f211a47c339e17810b601
block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'

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).

Cc: qemu-stable@nongnu.org
Fixes: 7452162adec2 ("qapi: add qom-path to BLOCK_IO_ERROR event")
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Message-ID: <09728d784888b38d7a8f09ee5e9e9c542c875e1e.1737973614.git.pkrempa@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit 107c551de0d7bc3aa8e926c557b66b9549616f42)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block/block-backend.c