diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-09-29 16:47:58 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-10-07 13:34:22 +0200 |
commit | 2bf7e10f78ebf67fbef364dce37ae844ba3c7a62 (patch) | |
tree | ba6e52cc41342bcf277d5c1702ad0293d8769532 /block | |
parent | c5f3014b82adc0e8f50bf5052031503d3467bea3 (diff) |
block: Add node name to BLOCK_IO_ERROR event
The event currently only contains the BlockBackend name. However, with
anonymous BlockBackends, this is always the empty string. Add the node
name so that the user can still see which block device caused the event.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/block-backend.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index 11b0d8b4c1..27ddacb3cf 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1197,8 +1197,9 @@ static void send_qmp_error_event(BlockBackend *blk, IoOperationType optype; optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE; - qapi_event_send_block_io_error(blk_name(blk), optype, action, - blk_iostatus_is_enabled(blk), + qapi_event_send_block_io_error(blk_name(blk), + bdrv_get_node_name(blk_bs(blk)), optype, + action, blk_iostatus_is_enabled(blk), error == ENOSPC, strerror(error), &error_abort); } |