qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4 1/2] qmp event: Add QUORUM_FLUSH_ERROR


From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH v4 1/2] qmp event: Add QUORUM_FLUSH_ERROR
Date: Tue, 23 Feb 2016 13:53:25 +0100
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Tue 23 Feb 2016 10:01:38 AM CET, Changlong Xie wrote:

> @@ -235,6 +235,11 @@ static void quorum_report_failure(QuorumAIOCB *acb)
>                                     acb->nb_sectors, &error_abort);
>  }
>  
> +static void quorum_flush_error(char *node_name, const char *msg)
> +{
> +    qapi_event_send_quorum_flush_error(node_name, msg, &error_abort);
> +}
> +

Instead of 'msg' I think you can receive an error code here and convert
it to a message using strerror(). Take a look at quorum_report_bad() to
see what I mean.

> +QUORUM_FLUSH_ERROR
> +-----------------
> +
> +Emitted to report flush error message of the Quorum block driver

Emitted to report a flush error in a Quorum file

> +
> +Data:
> +
> +- "node-name":     The graph node name of the block driver state.
> +- "error":         This field contains a human-readable error message.  
> There are
> +                   no semantics other than that the block layer reported an 
> error
> +                   and clients should not try to interpret the error string.

Can you reformat this paragraph so it takes less than 80 columns?

> +
> +Example:
> +
> +{ "event": "QUORUM_FLUSH_ERROR",
> +     "data": { "node-name": "1.raw", "error": "xxxxxx" },
> +     "timestamp": { "seconds": 1344522075, "microseconds": 745528 } }

'1.raw' is an invalid node name.

>  ##
> +# @QUORUM_FLUSH_ERROR
> +#
> +# Emitted to report flush error message of the Quorum block driver
> +#
> +# @node-name: the graph node name of the block driver state
> +#
> +# @error: This field contains a human-readable error message. There are no 
> semantics
> +#         other than that the block layer reported an error and clients 
> should not
> +#         try to interpret the error string.

Same changes I mentioned earlier.

> +#
> +# Since: 2.5

Since 2.6

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]