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 <victort...@redhat.com> wrote:
> >
> > Reason is not optional.
> >
> > Signed-off-by: Victor Toso <victort...@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,

Attachment: signature.asc
Description: PGP signature

Reply via email to