[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event
From: |
John Snow |
Subject: |
Re: [PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event |
Date: |
Thu, 24 Mar 2022 16:47:30 -0400 |
On Thu, Mar 24, 2022 at 1:50 PM Victor Toso <victortoso@redhat.com> wrote:
>
> Reason is not optional.
>
> Signed-off-by: Victor Toso <victortoso@redhat.com>
> ---
> qapi/block-core.json | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 585a9e020e..5b6c069dd9 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -5059,7 +5059,8 @@
> # "data": { "device": "ide0-hd1",
> # "node-name": "#block212",
> # "operation": "write",
> -# "action": "stop" },
> +# "action": "stop",
> +# "reason": "Driver requires too large request alignment" },
> # "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
> #
> ##
> --
> 2.35.1
>
We discourage people using the reason programmatically, but there will
indeed be one. Where'd you pull the message out from?
I see this:
static void send_qmp_error_event(BlockBackend *blk,
BlockErrorAction action,
bool is_read, int error)
{
IoOperationType optype;
BlockDriverState *bs = blk_bs(blk);
optype = is_read ? IO_OPERATION_TYPE_READ : IO_OPERATION_TYPE_WRITE;
qapi_event_send_block_io_error(blk_name(blk), !!bs,
bs ? bdrv_get_node_name(bs) : NULL, optype,
action, blk_iostatus_is_enabled(blk),
error == ENOSPC, strerror(error));
}
so it should be one of the "standard" strerror messages, right?
--js
- Re: [PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO, (continued)
[PATCH 04/14] qapi: fix example of BLOCK_JOB_PENDING event, Victor Toso, 2022/03/24
[PATCH 09/14] qapi: run-state examples: add missing member, Victor Toso, 2022/03/24
[PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event, Victor Toso, 2022/03/24
- Re: [PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event,
John Snow <=
[PATCH 07/14] qapi: fix example of UNPLUG_PRIMARY event, Victor Toso, 2022/03/24
[PATCH 13/14] qapi: fix example of ACPI_DEVICE_OST event, Victor Toso, 2022/03/24
[PATCH 11/14] qapi: fix example of MEMORY_FAILURE, Victor Toso, 2022/03/24
[PATCH 06/14] qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event, Victor Toso, 2022/03/24