qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Xie Yongji <xieyongji@bytedance.com>
Cc: kwolf@redhat.com, qemu-block@nongnu.org, mst@redhat.com,
	jasowang@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com,
	mlureau@redhat.com, stefanha@redhat.com, jsnow@redhat.com,
	sgarzare@redhat.com
Subject: Re: [PATCH v3 4/6] vduse-blk: implements vduse-blk export
Date: Mon, 21 Mar 2022 08:25:14 -0500	[thread overview]
Message-ID: <20220321132514.nmfl5rxjkncrnme3@redhat.com> (raw)
In-Reply-To: <20220321071439.151-5-xieyongji@bytedance.com>

On Mon, Mar 21, 2022 at 03:14:37PM +0800, Xie Yongji wrote:
> This implements a VDUSE block backends based on
> the libvduse library. We can use it to export the BDSs
> for both VM and container (host) usage.
> 
> The new command-line syntax is:
> 
> $ qemu-storage-daemon \
>     --blockdev file,node-name=drive0,filename=test.img \
>     --export vduse-blk,node-name=drive0,id=vduse-export0,writable=on
> 
> After the qemu-storage-daemon started, we need to use
> the "vdpa" command to attach the device to vDPA bus:
> 
> $ vdpa dev add name vduse-export0 mgmtdev vduse
> 
> Also the device must be removed via the "vdpa" command
> before we stop the qemu-storage-daemon.
> 
> Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
> ---

Looking at just the QAPI:

> +++ b/qapi/block-export.json
> @@ -170,6 +170,22 @@
>              '*allow-other': 'FuseExportAllowOther' },
>    'if': 'CONFIG_FUSE' }
>  
> +##
> +# @BlockExportOptionsVduseBlk:
> +#
> +# A vduse-blk block export.
> +#
> +# @num-queues: the number of virtqueues. Defaults to 1.
> +# @queue-size: the size of virtqueue. Defaults to 128.
> +# @logical-block-size: Logical block size in bytes. Defaults to 512 bytes.

Any restrictions on this not being allowed to be smaller than 512, or
that it must be a power of 2, or that it has a maximum size?  If so,
they should be documented.

> +#
> +# Since: 7.0

This is a new feature, and is too late for 7.0, so this line should
mention 7.1.

> +##
> +{ 'struct': 'BlockExportOptionsVduseBlk',
> +  'data': { '*num-queues': 'uint16',
> +            '*queue-size': 'uint16',
> +            '*logical-block-size': 'size'} }
> +
>  ##
>  # @NbdServerAddOptions:
>  #
> @@ -273,6 +289,7 @@
>  # @nbd: NBD export
>  # @vhost-user-blk: vhost-user-blk export (since 5.2)
>  # @fuse: FUSE export (since: 6.0)
> +# @vduse-blk: vduse-blk export (since 7.0)

Another spot for 7.1.

>  #
>  # Since: 4.2
>  ##
> @@ -280,7 +297,8 @@
>    'data': [ 'nbd',
>              { 'name': 'vhost-user-blk',
>                'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
> -            { 'name': 'fuse', 'if': 'CONFIG_FUSE' } ] }
> +            { 'name': 'fuse', 'if': 'CONFIG_FUSE' },
> +            { 'name': 'vduse-blk', 'if': 'CONFIG_VDUSE_BLK_EXPORT' } ] }
>  
>  ##
>  # @BlockExportOptions:
> @@ -324,7 +342,9 @@
>        'vhost-user-blk': { 'type': 'BlockExportOptionsVhostUserBlk',
>                            'if': 'CONFIG_VHOST_USER_BLK_SERVER' },
>        'fuse': { 'type': 'BlockExportOptionsFuse',
> -                'if': 'CONFIG_FUSE' }
> +                'if': 'CONFIG_FUSE' },
> +      'vduse-blk': { 'type': 'BlockExportOptionsVduseBlk',
> +                     'if': 'CONFIG_VDUSE_BLK_EXPORT' }
>     } }
>  

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2022-03-21 13:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21  7:14 [PATCH v3 0/6] Support exporting BDSs via VDUSE Xie Yongji
2022-03-21  7:14 ` [PATCH v3 1/6] block: Support passing NULL ops to blk_set_dev_ops() Xie Yongji
2022-03-21  7:14 ` [PATCH v3 2/6] linux-headers: Add vduse.h Xie Yongji
2022-03-21  7:14 ` [PATCH v3 3/6] libvduse: Add VDUSE (vDPA Device in Userspace) library Xie Yongji
2022-03-21  7:14 ` [PATCH v3 4/6] vduse-blk: implements vduse-blk export Xie Yongji
2022-03-21 13:25   ` Eric Blake [this message]
2022-03-21 14:02     ` Yongji Xie
2022-03-21  7:14 ` [PATCH v3 5/6] vduse-blk: Add vduse-blk resize support Xie Yongji
2022-03-21  7:14 ` [PATCH v3 6/6] libvduse: Add support for reconnecting Xie Yongji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220321132514.nmfl5rxjkncrnme3@redhat.com \
    --to=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mlureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanha@redhat.com \
    --cc=xieyongji@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).