qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Sam Li <faithilikerun@gmail.com>
Cc: qemu-devel@nongnu.org, damien.lemoal@opensource.wdc.com,
	 dmitry.fomichev@wdc.com, hare@suse.de, stefanha@redhat.com,
	mst@redhat.com,  armbru@redhat.com, qemu-block@nongnu.org,
	fam@euphon.net, kwolf@redhat.com,  hreitz@redhat.com,
	eblake@redhat.com
Subject: Re: [RFC v5 09/11] qemu-io: add zoned block device operations.
Date: Mon, 1 Aug 2022 11:48:47 -0400	[thread overview]
Message-ID: <CAJSP0QXhvp2YoYN9jdfMPjmRDR2ZtQiXi_Vdrv=9283GsO48gg@mail.gmail.com> (raw)
In-Reply-To: <20220801013359.10702-1-faithilikerun@gmail.com>

On Sun, 31 Jul 2022 at 21:42, Sam Li <faithilikerun@gmail.com> wrote:
>
> Add zoned storage commands of the device: zone_report(zrp), zone_open(zo),
> zone_close(zc), zone_reset(zrs), zone_finish(zf).
>
> For example, to test zone_report, use following command:
> $ ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0
> -c "zrp offset nr_zones"
>
> Signed-off-by: Sam Li <faithilikerun@gmail.com>
> ---
>  block/io.c     |  24 ++-------
>  qemu-io-cmds.c | 144 +++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 148 insertions(+), 20 deletions(-)
>
> diff --git a/block/io.c b/block/io.c
> index a4625fb0e1..de9ec1d740 100644
> --- a/block/io.c
> +++ b/block/io.c
> @@ -3209,19 +3209,11 @@ int bdrv_co_zone_report(BlockDriverState *bs, int64_t offset,
>      IO_CODE();
>
>      bdrv_inc_in_flight(bs);
> -    if (!drv || (!drv->bdrv_co_zone_report)) {
> +    if (!drv || !drv->bdrv_co_zone_report) {
>          co.ret = -ENOTSUP;
>          goto out;
>      }
> -
> -    if (drv->bdrv_co_zone_report) {
> -        co.ret = drv->bdrv_co_zone_report(bs, offset, nr_zones, zones);
> -    } else {
> -        co.ret = -ENOTSUP;
> -        goto out;
> -        qemu_coroutine_yield();
> -    }
> -
> +    co.ret = drv->bdrv_co_zone_report(bs, offset, nr_zones, zones);
>  out:
>      bdrv_dec_in_flight(bs);
>      return co.ret;
> @@ -3237,19 +3229,11 @@ int bdrv_co_zone_mgmt(BlockDriverState *bs, BlockZoneOp op,
>      IO_CODE();
>
>      bdrv_inc_in_flight(bs);
> -    if (!drv || (!drv->bdrv_co_zone_mgmt)) {
> +    if (!drv || !drv->bdrv_co_zone_mgmt) {
>          co.ret = -ENOTSUP;
>          goto out;
>      }
> -
> -    if (drv->bdrv_co_zone_mgmt) {
> -        co.ret = drv->bdrv_co_zone_mgmt(bs, op, offset, len);
> -    } else {
> -        co.ret = -ENOTSUP;
> -        goto out;
> -        qemu_coroutine_yield();
> -    }
> -
> +    co.ret = drv->bdrv_co_zone_mgmt(bs, op, offset, len);
>  out:
>      bdrv_dec_in_flight(bs);
>      return co.ret;

Please squash these changes into the earlier patch that introduced
these functions.

Otherwise:

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>


      reply	other threads:[~2022-08-01 15:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  1:33 [RFC v5 09/11] qemu-io: add zoned block device operations Sam Li
2022-08-01 15:48 ` Stefan Hajnoczi [this message]

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='CAJSP0QXhvp2YoYN9jdfMPjmRDR2ZtQiXi_Vdrv=9283GsO48gg@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=armbru@redhat.com \
    --cc=damien.lemoal@opensource.wdc.com \
    --cc=dmitry.fomichev@wdc.com \
    --cc=eblake@redhat.com \
    --cc=faithilikerun@gmail.com \
    --cc=fam@euphon.net \
    --cc=hare@suse.de \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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).