From fd87a6bd3b78cc51be5be2cf1bccffd010a3f4cb Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Aug 2017 21:14:04 +0200 Subject: qapi-schema: Move block events from event.json to block.json Cc: Alberto Garcia Signed-off-by: Markus Armbruster Message-Id: <1503602048-12268-13-git-send-email-armbru@redhat.com> Reviewed-by: Alberto Garcia Reviewed-by: Marc-André Lureau --- qapi/block.json | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'qapi/block.json') diff --git a/qapi/block.json b/qapi/block.json index 414b61bde7..8ce335739f 100644 --- a/qapi/block.json +++ b/qapi/block.json @@ -277,3 +277,71 @@ ## { 'enum': 'QuorumOpType', 'data': [ 'read', 'write', 'flush' ] } + +## +# @QUORUM_FAILURE: +# +# Emitted by the Quorum block driver if it fails to establish a quorum +# +# @reference: device name if defined else node name +# +# @sector-num: number of the first sector of the failed read operation +# +# @sectors-count: failed read operation sector count +# +# Note: This event is rate-limited. +# +# Since: 2.0 +# +# Example: +# +# <- { "event": "QUORUM_FAILURE", +# "data": { "reference": "usr1", "sector-num": 345435, "sectors-count": 5 }, +# "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } +# +## +{ 'event': 'QUORUM_FAILURE', + 'data': { 'reference': 'str', 'sector-num': 'int', 'sectors-count': 'int' } } + +## +# @QUORUM_REPORT_BAD: +# +# Emitted to report a corruption of a Quorum file +# +# @type: quorum operation type (Since 2.6) +# +# @error: error message. Only present on failure. 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. +# +# @node-name: the graph node name of the block driver state +# +# @sector-num: number of the first sector of the failed read operation +# +# @sectors-count: failed read operation sector count +# +# Note: This event is rate-limited. +# +# Since: 2.0 +# +# Example: +# +# 1. Read operation +# +# { "event": "QUORUM_REPORT_BAD", +# "data": { "node-name": "node0", "sector-num": 345435, "sectors-count": 5, +# "type": "read" }, +# "timestamp": { "seconds": 1344522075, "microseconds": 745528 } } +# +# 2. Flush operation +# +# { "event": "QUORUM_REPORT_BAD", +# "data": { "node-name": "node0", "sector-num": 0, "sectors-count": 2097120, +# "type": "flush", "error": "Broken pipe" }, +# "timestamp": { "seconds": 1456406829, "microseconds": 291763 } } +# +## +{ 'event': 'QUORUM_REPORT_BAD', + 'data': { 'type': 'QuorumOpType', '*error': 'str', 'node-name': 'str', + 'sector-num': 'int', 'sectors-count': 'int' } } -- cgit v1.2.3-55-g7522 From f5cf31c5758b9ab8b77f4d6ccd3ffe43036c5480 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 24 Aug 2017 21:14:08 +0200 Subject: qapi-schema: Improve section headings The generated QEMU QMP reference is now structured as follows: 1.1 Introduction 1.2 Stability Considerations 1.3 Common data types 1.4 Socket data types 1.5 VM run state 1.6 Cryptography 1.7 Block devices 1.7.1 Block core (VM unrelated) 1.7.2 QAPI block definitions (vm unrelated) 1.8 Character devices 1.9 Net devices 1.10 Rocker switch device 1.11 TPM (trusted platform module) devices 1.12 Remote desktop 1.12.1 Spice 1.12.2 VNC 1.13 Input 1.14 Migration 1.15 Transactions 1.16 Tracing 1.17 QMP introspection 1.18 Miscellanea Section "1.18 Miscellanea" is still too big: it documents 134 symbols. Section "1.7.1 Block core (VM unrelated)" is also rather big: 128 symbols. All the others are of reasonable size. Signed-off-by: Markus Armbruster Message-Id: <1503602048-12268-17-git-send-email-armbru@redhat.com> Reviewed-by: Marc-André Lureau --- qapi-schema.json | 2 +- qapi/block-core.json | 2 +- qapi/block.json | 5 ++--- qapi/common.json | 2 +- qapi/crypto.json | 2 +- qapi/trace.json | 2 +- 6 files changed, 7 insertions(+), 8 deletions(-) (limited to 'qapi/block.json') diff --git a/qapi-schema.json b/qapi-schema.json index 7a393ec3e9..f3af2cb851 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -94,7 +94,7 @@ { 'include': 'qapi/introspect.json' } ## -# = QMP commands +# = Miscellanea ## ## diff --git a/qapi/block-core.json b/qapi/block-core.json index f4caa5c21b..28abb9e6cf 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1,7 +1,7 @@ # -*- Mode: Python -*- ## -# == QAPI block core definitions (vm unrelated) +# == Block core (VM unrelated) ## { 'include': 'common.json' } diff --git a/qapi/block.json b/qapi/block.json index 8ce335739f..f093fa3f27 100644 --- a/qapi/block.json +++ b/qapi/block.json @@ -1,14 +1,13 @@ # -*- Mode: Python -*- ## -# = QAPI block definitions +# = Block devices ## -# QAPI block core definitions { 'include': 'block-core.json' } ## -# == QAPI block definitions (vm unrelated) +# == Additional block stuff (VM related) ## ## diff --git a/qapi/common.json b/qapi/common.json index 0c67e4acf5..6eb01821ef 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -1,7 +1,7 @@ # -*- Mode: Python -*- ## -# = QAPI common definitions +# = Common data types ## ## diff --git a/qapi/crypto.json b/qapi/crypto.json index 6b6fde367a..288bc056ef 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -2,7 +2,7 @@ # ## -# = QAPI crypto definitions +# = Cryptography ## ## diff --git a/qapi/trace.json b/qapi/trace.json index de6588d9f7..799b254a18 100644 --- a/qapi/trace.json +++ b/qapi/trace.json @@ -6,7 +6,7 @@ # See the COPYING file in the top-level directory. ## -# = Tracing commands +# = Tracing ## ## -- cgit v1.2.3-55-g7522