From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY8pV-0007PK-VC for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:00:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY8pU-0003BD-78 for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:00:25 -0500 Received: from [59.151.112.132] (port=1845 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY8pS-00037w-Fx for qemu-devel@nongnu.org; Tue, 23 Feb 2016 04:00:24 -0500 From: Changlong Xie Date: Tue, 23 Feb 2016 17:01:38 +0800 Message-ID: <1456218099-386-2-git-send-email-xiecl.fnst@cn.fujitsu.com> In-Reply-To: <1456218099-386-1-git-send-email-xiecl.fnst@cn.fujitsu.com> References: <1456218099-386-1-git-send-email-xiecl.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [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 Cc: "Dr. David Alan Gilbert" 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. -- 1.9.3