]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev-nbd.c
block/export: Add BlockExport infrastructure and block-export-add
authorKevin Wolf <kwolf@redhat.com>
Thu, 24 Sep 2020 15:26:50 +0000 (17:26 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 2 Oct 2020 13:46:40 +0000 (15:46 +0200)
commit56ee86261e0ffa151e82b383d9628cf5660be355
treec06329391f7c3e8095e71858930df7e21f9e3a6e
parent143ea7670cbd3865f577602469b5483b550b4c5e
block/export: Add BlockExport infrastructure and block-export-add

We want to have a common set of commands for all types of block exports.
Currently, this is only NBD, but we're going to add more types.

This patch adds the basic BlockExport and BlockExportDriver structs and
a QMP command block-export-add that creates a new export based on the
given BlockExportOptions.

qmp_nbd_server_add() becomes a wrapper around qmp_block_export_add().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200924152717.287415-5-kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/export/export.c [new file with mode: 0644]
block/export/meson.build [new file with mode: 0644]
block/meson.build
blockdev-nbd.c
include/block/export.h [new file with mode: 0644]
include/block/nbd.h
meson.build
nbd/server.c
qapi/block-export.json