OSDN Git Service

block/export: vhost-user block device backend server
authorCoiby Xu <coiby.xu@gmail.com>
Fri, 18 Sep 2020 08:09:10 +0000 (16:09 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 23 Oct 2020 12:42:16 +0000 (13:42 +0100)
commit3578389bcf76c824a5d82e6586a6f0c71e56f2aa
tree5e6a6aa384e02162dba0b44b500a2c38df848f0c
parent5937835ac4cfb2f5e16bebf13b9ea42770c96785
block/export: vhost-user block device backend server

By making use of libvhost-user, block device drive can be shared to
the connected vhost-user client. Only one client can connect to the
server one time.

Since vhost-user-server needs a block drive to be created first, delay
the creation of this object.

Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20200918080912.321299-6-coiby.xu@gmail.com
[Shorten "vhost_user_blk_server" string to "vhost_user_blk" to avoid the
following compiler warning:
../block/export/vhost-user-blk-server.c:178:50: error: ‘%s’ directive output truncated writing 21 bytes into a region of size 20 [-Werror=format-truncation=]
and fix "Invalid size %ld ..." ssize_t format string arguments for
32-bit hosts.
--Stefan]
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/export/vhost-user-blk-server.c [new file with mode: 0644]
block/export/vhost-user-blk-server.h [new file with mode: 0644]
block/meson.build
softmmu/vl.c