From 779d82e1d305f2a9cbd7f48cf6555ad58145e04a Mon Sep 17 00:00:00 2001 From: Xie Yongji Date: Tue, 14 Jun 2022 13:15:32 +0800 Subject: vduse-blk: Add name option Currently we use 'id' option as the name of VDUSE device. It's a bit confusing since we use one value for two different purposes: the ID to identfy the export within QEMU (must be distinct from any other exports in the same QEMU process, but can overlap with names used by other processes), and the VDUSE name to uniquely identify it on the host (must be distinct from other VDUSE devices on the same host, but can overlap with other export types like NBD in the same process). To make it clear, this patch adds a separate 'name' option to specify the VDUSE name for the vduse-blk export instead. Signed-off-by: Xie Yongji Message-Id: <20220614051532.92-7-xieyongji@bytedance.com> Signed-off-by: Kevin Wolf --- qapi/block-export.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qapi/block-export.json') diff --git a/qapi/block-export.json b/qapi/block-export.json index 618a6367c9..4627bbc4e6 100644 --- a/qapi/block-export.json +++ b/qapi/block-export.json @@ -183,6 +183,7 @@ # # A vduse-blk block export. # +# @name: the name of VDUSE device (must be unique across the host). # @num-queues: the number of virtqueues. Defaults to 1. # @queue-size: the size of virtqueue. Defaults to 256. # @logical-block-size: Logical block size in bytes. Range [512, PAGE_SIZE] @@ -192,7 +193,8 @@ # Since: 7.1 ## { 'struct': 'BlockExportOptionsVduseBlk', - 'data': { '*num-queues': 'uint16', + 'data': { 'name': 'str', + '*num-queues': 'uint16', '*queue-size': 'uint16', '*logical-block-size': 'size', '*serial': 'str' } } @@ -320,8 +322,7 @@ # Describes a block export, i.e. how single node should be exported on an # external interface. # -# @id: A unique identifier for the block export (across the host for vduse-blk -# export type or across all export types for other types) +# @id: A unique identifier for the block export (across all export types) # # @node-name: The node name of the block node to be exported (since: 5.2) # -- cgit v1.2.3