mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
block/export: Add 'id' option to block-export-add
We'll need an id to identify block exports in monitor commands. This adds one. Note that this is different from the 'name' option in the NBD server, which is the externally visible export name. While block export ids need to be unique in the whole process, export names must be unique only for the same server. Different export types or (potentially in the future) multiple NBD servers can have the same export name externally, but still need different block export ids internally. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20200924152717.287415-19-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
bc4ee65b8c
commit
d53be9ce55
7 changed files with 39 additions and 3 deletions
|
@ -1064,6 +1064,7 @@ int main(int argc, char **argv)
|
|||
export_opts = g_new(BlockExportOptions, 1);
|
||||
*export_opts = (BlockExportOptions) {
|
||||
.type = BLOCK_EXPORT_TYPE_NBD,
|
||||
.id = g_strdup("qemu-nbd-export"),
|
||||
.node_name = g_strdup(bdrv_get_node_name(bs)),
|
||||
.has_writethrough = true,
|
||||
.writethrough = writethrough,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue