[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a driv
From: |
Benoît Canet |
Subject: |
[Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph. |
Date: |
Tue, 3 Dec 2013 14:26:01 +0100 |
---
blockdev.c | 8 ++++++++
qapi-schema.json | 32 ++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index a474bb5..824e718 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1940,6 +1940,14 @@ void qmp_drive_backup(const char *device, const char
*target,
}
}
+BlockGraphNode * qmp_query_drive_graph(const char *device, Error **errp)
+{
+ /* the implementation of this function would recurse through the
+ * BlockDriverState graph to build it's result
+ */
+ return NULL;
+}
+
#define DEFAULT_MIRROR_BUF_SIZE (10 << 20)
void qmp_drive_mirror(const char *device, const char *target,
diff --git a/qapi-schema.json b/qapi-schema.json
index 8630eb5..938f8b9 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -2008,6 +2008,38 @@
{ 'command': 'drive-backup', 'data': 'DriveBackup' }
##
+# @BlockGraphNode
+#
+# Information about a node of the block driver state graph
+#
+# @node-name: the name of the node in the graph
+#
+# @drv: the name of the block format used by this node as described in
+# @BlockDeviceInfo.
+#
+# @children: a list of @BlockGraphNode being the children of this node
+#
+# Since 1.8
+##
+{ 'type': 'BlockGraphNode',
+ 'data': { 'node-name': 'str', 'drv': 'str', 'children': ['BlockGraphNode'] }
}
+
+##
+# @query-drive-graph
+#
+# Get the block driver states graph for a given drive
+#
address@hidden: the name of the device to get the graph from
+#
+# Returns: the root @BlockGraphNode
+#
+# Since 1.8
+##
+{ 'command': 'query-drive-graph',
+ 'data': { 'device': 'str' },
+ 'returns': 'BlockGraphNode' }
+
+##
# @drive-mirror
#
# Start mirroring a block device's writes to a new destination.
--
1.8.3.2
- [Qemu-devel] [RFC V3 0/7] Giving names to BlockDriverState graph nodes, Benoît Canet, 2013/12/03
- [Qemu-devel] [RFC V3 2/7] block: Allow the user to define "node-name" option., Benoît Canet, 2013/12/03
- [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph.,
Benoît Canet <=
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Fam Zheng, 2013/12/03
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Eric Blake, 2013/12/04
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Benoît Canet, 2013/12/05
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Eric Blake, 2013/12/05
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Benoît Canet, 2013/12/05
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Eric Blake, 2013/12/05
- Re: [Qemu-devel] [RFC V3 3/7] qapi: Add skeletton of command to query a drive bs graph., Benoît Canet, 2013/12/05
[Qemu-devel] [RFC V3 1/7] block: Add bs->node_name to hold the name of a bs node of the bs graph., Benoît Canet, 2013/12/03
[Qemu-devel] [RFC V3 4/7] qmp: Allow block_passwd to manipulate bs graph nodes., Benoît Canet, 2013/12/03