This patch series converts Coiby Xu's vhost-user-blk-server from a QOM object to the block exports API. The block exports API provides a standard QMP and command-line interface for managing block exports (NBD, FUSE, vhost-user-blk, etc). A fair amount of init/shutdown code is removed because the block exports API already takes care of that functionality.
Most of the patches are vhost-user-blk-server cleanups. The syntax for launching qemu-storage-daemon is: $ qemu-storage-daemon \ --blockdev file,node-name=drive0,filename=test.img \ --export vhost-user-blk,node-name=drive0,id=export0,writable=on,unix-socket=/tmp/vhost-user-blk.sock QEMU can connect to the vhost-user-blk export like this: $ qemu-system-x86_64 \ -M accel=kvm,memory-backend=mem \ -m 1G \ -object memory-backend-memfd,size=1G,id=mem \ -cpu host \ -chardev socket,path=/tmp/vhost-user-blk.sock,id=char0 \ -device vhost-user-blk-pci,chardev=char0 Based-on: 20200918080912.321299-1-coiby...@gmail.com ("[PATCH v10 0/7] vhost-user block device backend implementation") Based-on: 20200907182011.521007-1-kw...@redhat.com ("[PATCH 00/29] block/export: Add infrastructure and QAPI for block exports") Stefan Hajnoczi (11): block/export: shorten serial string to fit util/vhost-user-server: s/fileds/fields/ typo fix util/vhost-user-server: drop unnecessary QOM cast util/vhost-user-server: drop unnecessary watch deletion block/export: consolidate request structs into VuBlockReq util/vhost-user-server: drop unused DevicePanicNotifier util/vhost-user-server: fix memory leak in vu_message_read() util/vhost-user-server: check EOF when reading payload util/vhost-user-server: rework vu_client_trip() coroutine lifecycle block/export: report flush errors block/export: convert vhost-user-blk server to block export API qapi/block-export.json | 19 +- block/export/vhost-user-blk-server.h | 23 +- util/vhost-user-server.h | 32 +- block/export/export.c | 8 +- block/export/vhost-user-blk-server.c | 534 ++++++++------------------- util/vhost-user-server.c | 322 ++++++++-------- block/export/meson.build | 1 + block/meson.build | 1 - 8 files changed, 360 insertions(+), 580 deletions(-) -- 2.26.2