From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY8uq-0006KV-F7 for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:05:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY8um-0004Vr-5m for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:05:56 -0500 Received: from [59.151.112.132] (port=23944 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY8ul-0004VK-2n for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:05:51 -0500 Message-ID: <56CC2149.9040709@cn.fujitsu.com> Date: Tue, 23 Feb 2016 17:07:21 +0800 From: Changlong Xie MIME-Version: 1.0 References: <1456218099-386-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1456218099-386-2-git-send-email-xiecl.fnst@cn.fujitsu.com> In-Reply-To: <1456218099-386-2-git-send-email-xiecl.fnst@cn.fujitsu.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/2] qmp event: Add QUORUM_FLUSH_ERROR List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu devel , Alberto Garcia , Eric Blake , Kevin Wolf , Max Reitz , Markus Armbruster Cc: "Dr. David Alan Gilbert" cc: Markus Armbruster On 02/23/2016 05:01 PM, Changlong Xie wrote: > Signed-off-by: Wen Congyang > Signed-off-by: Changlong Xie > --- > block/quorum.c | 5 +++++ > docs/qmp-events.txt | 18 ++++++++++++++++++ > qapi/event.json | 16 ++++++++++++++++ > 3 files changed, 39 insertions(+) > > diff --git a/block/quorum.c b/block/quorum.c > index f78d4cb..d3c3958 100644 > --- a/block/quorum.c > +++ b/block/quorum.c > @@ -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); > +} > + > static int quorum_vote_error(QuorumAIOCB *acb); > > static bool quorum_has_too_much_io_failed(QuorumAIOCB *acb) > diff --git a/docs/qmp-events.txt b/docs/qmp-events.txt > index b6e8937..d777873 100644 > --- a/docs/qmp-events.txt > +++ b/docs/qmp-events.txt > @@ -340,6 +340,24 @@ Example: > > Note: this event is rate-limited. > > +QUORUM_FLUSH_ERROR > +----------------- > + > +Emitted to report flush error message of the Quorum block driver > + > +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. > + > +Example: > + > +{ "event": "QUORUM_FLUSH_ERROR", > + "data": { "node-name": "1.raw", "error": "xxxxxx" }, > + "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } > + > RESET > ----- > > diff --git a/qapi/event.json b/qapi/event.json > index cfcc887..5b16706 100644 > --- a/qapi/event.json > +++ b/qapi/event.json > @@ -358,6 +358,22 @@ > 'sector-num': 'int', 'sectors-count': 'int' } } > > ## > +# @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. > +# > +# Since: 2.5 > +## > +{ 'event': 'QUORUM_FLUSH_ERROR', > + 'data': { 'node-name': 'str', 'error': 'str'} } > + > +## > # @VSERPORT_CHANGE > # > # Emitted when the guest opens or closes a virtio-serial port. >