All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Sam Li <faithilikerun@gmail.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Hanna Reitz <hreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>,
	dlemoal@kernel.org, qemu-block@nongnu.org,
	dmitry.fomichev@wdc.com, Markus Armbruster <armbru@redhat.com>,
	Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
	Eric Blake <eblake@redhat.com>
Subject: Re: [PATCH v12 2/5] qcow2: add configurations for zoned format extension
Date: Fri, 26 Jun 2026 14:26:36 +0200	[thread overview]
Message-ID: <aj5v_GsZyzPSwlPR@ryzen> (raw)
In-Reply-To: <20260623184830.373232-3-faithilikerun@gmail.com>

On Tue, Jun 23, 2026 at 08:48:27PM +0200, Sam Li wrote:
> To configure the zoned format feature on the qcow2 driver, it
> requires settings as: the device size, zone model, zone size,
> zone capacity, number of conventional zones, limits on zone
> resources (max append bytes, max open zones, and max_active_zones).
> 
> To create a qcow2 image with zoned format feature, use command like
> this:
> qemu-img create -f qcow2 zbc.qcow2 -o size=768M \
> -o zone.size=64M -o zone.capacity=64M -o zone.conventional_zones=0 \
> -o zone.max_append_bytes=4096 -o zone.max_open_zones=6 \
> -o zone.max_active_zones=8 -o zone.mode=host-managed
> 
> Signed-off-by: Sam Li <faithilikerun@gmail.com>
> Acked-by: Markus Armbruster <armbru@redhat.com> # QAPI schema
> ---
>  block/file-posix.c               |   2 +-
>  block/qcow2.c                    | 335 ++++++++++++++++++++++++++++++-
>  block/qcow2.h                    |  83 +++++++-
>  docs/interop/qcow2.rst           | 120 ++++++++++-
>  include/block/block_int-common.h |  15 +-
>  qapi/block-core.json             |  91 ++++++++-
>  tests/qemu-iotests/082.out       | 126 ++++++++++++
>  7 files changed, 763 insertions(+), 9 deletions(-)
> 
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 3c985da94f..ddb159c58b 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -3600,7 +3600,7 @@ raw_co_zone_append(BlockDriverState *bs,
>  
>      if (*offset & zone_size_mask) {
>          error_report("sector offset %" PRId64 " is not aligned to zone size "
> -                     "%" PRId32 "", *offset / 512, bs->bl.zone_size / 512);
> +                     "%" PRId64 "", *offset / 512, bs->bl.zone_size / 512);
>          return -EINVAL;
>      }

I think it would be easier if this change, together with:

> @@ -901,7 +908,13 @@ typedef struct BlockLimits {
>      BlockZoneModel zoned;
>  
>      /* zone size expressed in bytes */
> -    uint32_t zone_size;
> +    uint64_t zone_size;

was in a separate prep patch earlier in this series.

While I understand the logic behind increasing the zone_size to uint64_t
(i.e. to match "struct blk_zone" struct member "len" (representing
zone size) in Linux include/uapi/linux/blkzoned.h), this seems like an
independent change that should be done to the QEMU block layer, that
does not really have anything to do with adding qcow2 zoned support.


Kind regards,
Niklas


  reply	other threads:[~2026-06-26 12:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-23 18:48 [PATCH v12 0/5] Add full zoned storage emulation to the qcow2 driver Sam Li
2026-06-23 18:48 ` [PATCH v12 1/5] docs/qcow2: add the zoned format feature Sam Li
2026-06-23 18:48 ` [PATCH v12 2/5] qcow2: add configurations for zoned format extension Sam Li
2026-06-26 12:26   ` Niklas Cassel [this message]
2026-06-23 18:48 ` [PATCH v12 3/5] virtio-blk: do not merge writes across a zone boundary Sam Li
2026-06-24 19:21   ` Stefan Hajnoczi
2026-06-26 11:44   ` Niklas Cassel
2026-06-26 11:50     ` Sam Li
2026-06-23 18:48 ` [PATCH v12 4/5] qcow2: add zoned emulation capability Sam Li
2026-06-23 18:48 ` [PATCH v12 5/5] iotests: test the zoned format feature for qcow2 file Sam Li
2026-06-26 11:33 ` [PATCH v12 0/5] Add full zoned storage emulation to the qcow2 driver Niklas Cassel
2026-06-26 11:41   ` Sam Li

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=aj5v_GsZyzPSwlPR@ryzen \
    --to=cassel@kernel.org \
    --cc=armbru@redhat.com \
    --cc=dlemoal@kernel.org \
    --cc=dmitry.fomichev@wdc.com \
    --cc=eblake@redhat.com \
    --cc=faithilikerun@gmail.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mst@redhat.com \
    --cc=pierrick.bouvier@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.