[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: |
Victor Toso |
|
Subject: |
Re: [PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event |
|
Date: |
Fri, 25 Mar 2022 21:52:00 +0100 |
Hi,
On Thu, Mar 24, 2022 at 04:47:30PM -0400, John Snow wrote:
> 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 was looking into the block related errors and pick a string. It
wasn't a real error that I had.
> 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?
Yep. I'll pick that one and use 'No space left on device'
Cheers,
signature.asc
Description: PGP signature
- 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
[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