[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union
From: |
Fiona Ebner |
Subject: |
[PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union |
Date: |
Fri, 24 Feb 2023 15:48:21 +0100 |
In preparation to additionally return job-type-specific information.
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
qapi/block-core.json | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index c1ac6de238..adb43a4592 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1342,13 +1342,15 @@
#
# Since: 1.1
##
-{ 'struct': 'BlockJobInfo',
- 'data': {'type': 'JobType', 'device': 'str', 'len': 'int',
+{ 'union': 'BlockJobInfo',
+ 'base': {'type': 'JobType', 'device': 'str', 'len': 'int',
'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
'io-status': 'BlockDeviceIoStatus', 'ready': 'bool',
'status': 'JobStatus',
'auto-finalize': 'bool', 'auto-dismiss': 'bool',
- '*error': 'str' } }
+ '*error': 'str' },
+ 'discriminator': 'type',
+ 'data': {} }
##
# @query-block-jobs:
--
2.30.2
- [PATCH 0/9] mirror: allow switching from background to active mode, Fiona Ebner, 2023/02/24
- [PATCH 4/9] qapi/block-core: use JobType for BlockJobInfo's type, Fiona Ebner, 2023/02/24
- [PATCH 1/9] blockjob: introduce block-job-change QMP command, Fiona Ebner, 2023/02/24
- [PATCH 2/9] block/mirror: set actively_synced even after the job is ready, Fiona Ebner, 2023/02/24
- [PATCH 5/9] qapi/block-core: turn BlockJobInfo into a union,
Fiona Ebner <=
- [PATCH 3/9] mirror: implement mirror_change method, Fiona Ebner, 2023/02/24
- [PATCH 6/9] blockjob: query driver-specific info via a new 'query' driver method, Fiona Ebner, 2023/02/24
- [PATCH 7/9] mirror: return mirror-specific information upon query, Fiona Ebner, 2023/02/24
- [PATCH 8/9] mirror: return the remaining dirty bytes upon query, Fiona Ebner, 2023/02/24
- [PATCH 9/9] mirror: return the total number of bytes sent upon query, Fiona Ebner, 2023/02/24