From: Markus Armbruster <armbru@redhat.com>
To: Sam Li <faithilikerun@gmail.com>
Cc: qemu-devel@nongnu.org,
Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>,
dmitry.fomichev@wdc.com, Kevin Wolf <kwolf@redhat.com>,
cassel@kernel.org, Stefan Hajnoczi <stefanha@redhat.com>,
qemu-block@nongnu.org, dlemoal@kernel.org,
Eric Blake <eblake@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
hare@suse.de, Hanna Reitz <hreitz@redhat.com>
Subject: Re: [PATCH v10 2/4] qcow2: add configurations for zoned format extension
Date: Mon, 18 May 2026 09:57:06 +0200 [thread overview]
Message-ID: <87mrxxw3ot.fsf@pond.sub.org> (raw)
In-Reply-To: <20260510175059.311814-3-faithilikerun@gmail.com> (Sam Li's message of "Sun, 10 May 2026 19:50:57 +0200")
Sam Li <faithilikerun@gmail.com> writes:
> 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>
[...]
Just doc polish this time around. Never been closer!
> diff --git a/qapi/block-core.json b/qapi/block-core.json
> index 508b081ac1..d771dfb4a1 100644
> --- a/qapi/block-core.json
> +++ b/qapi/block-core.json
> @@ -5268,6 +5268,70 @@
> { 'enum': 'Qcow2CompressionType',
> 'data': [ 'zlib', { 'name': 'zstd', 'if': 'CONFIG_ZSTD' } ] }
>
> +##
> +# @Qcow2ZoneModel:
> +#
> +# Zoned device model used in qcow2 image file
> +#
> +# @host-managed: The host-managed model only allows sequential write
> +# over the device zones.
> +#
> +# Since 11.0
It's 11.1 now. More of the same below, not flagging it again.
> +##
> +{ 'enum': 'Qcow2ZoneModel',
> + 'data': [ 'host-managed'] }
> +
> +##
> +# @Qcow2ZoneHostManaged:
> +#
> +# The host-managed zone model. It only allows sequential writes.
> +#
> +# @size: Total number of bytes within zones (default 256 MB).
> +#
> +# @capacity: The number of usable logical blocks within zones
> +# in bytes. A zone capacity is always smaller or equal to the
> +# zone size (default to zone size).
"Number blocks ... in bytes" is awkward. Do you mean the usable space,
which is a multiple of the logical block size?
> +#
> +# @conventional-zones: The number of conventional zones of the
> +# zoned device (default 0).
> +#
> +# @max-open-zones: The maximal number of open zones. It is less than
> +# or equal to the number of sequential write required zones of
> +# the device (default 0).
Is the "number of sequential write required zones" visible via QMP?
> +#
> +# @max-active-zones: The maximal number of zones in the implicit
> +# open, explicit open or closed state. It is less than or equal
> +# to the max open zones (default 0).
"to the maximal number of open zones" or "to @max-open-zones"
> +#
> +# @max-append-bytes: The maximal number of bytes of a zone
> +# append request that can be issued to the device. It must be
> +# 512-byte aligned and less than the zone capacity
> +# (default 64 KB).
"Must be 512-byte aligned": do you mean it must be a multiple of 512?
> +#
> +# Since 11.0
> +##
> +{ 'struct': 'Qcow2ZoneHostManaged',
> + 'data': { '*size': 'size',
> + '*capacity': 'size',
> + '*conventional-zones': 'uint32',
> + '*max-open-zones': 'uint32',
> + '*max-active-zones': 'uint32',
> + '*max-append-bytes': 'size' } }
> +
> +##
> +# @Qcow2ZoneCreateOptions:
> +#
> +# The zone device model for the qcow2 image.
"Device model" has a specific meaning in QEMU: it's a device frontend,
such as "ide-hd", "e1000", "usb-tablet", ...
Maybe something like "Creation options for zoned qcow2 images"?
> +#
> +# @mode: The zone device model modes.
Sure its plural modes, and not mode?
> +#
> +# Since 11.0
> +##
> +{ 'union': 'Qcow2ZoneCreateOptions',
> + 'base': { 'mode': 'Qcow2ZoneModel' },
> + 'discriminator': 'mode',
> + 'data': { 'host-managed': 'Qcow2ZoneHostManaged' } }
> +
> ##
> # @BlockdevCreateOptionsQcow2:
> #
> @@ -5310,6 +5374,9 @@
> # @compression-type: The image cluster compression method
> # (default: zlib, since 5.1)
> #
> +# @zone: The zone device model modes. The default is that the
> +# device is not zoned. (since 11.0)
Maybe something like
# @zone: Options for zoned images. If absent, the device is not
# zoned. (Since 11.0)
> +#
> # Since: 2.12
> ##
> { 'struct': 'BlockdevCreateOptionsQcow2',
> @@ -5326,7 +5393,8 @@
> '*preallocation': 'PreallocMode',
> '*lazy-refcounts': 'bool',
> '*refcount-bits': 'int',
> - '*compression-type':'Qcow2CompressionType' } }
> + '*compression-type':'Qcow2CompressionType',
> + '*zone': 'Qcow2ZoneCreateOptions' } }
>
> ##
> # @BlockdevCreateOptionsQed:
next prev parent reply other threads:[~2026-05-18 7:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 17:50 [PATCH v10 0/4] Add full zoned storage emulation to qcow2 driver Sam Li
2026-05-10 17:50 ` [PATCH v10 1/4] docs/qcow2: add the zoned format feature Sam Li
2026-05-14 18:47 ` Stefan Hajnoczi
2026-05-17 21:07 ` Sam Li
2026-05-10 17:50 ` [PATCH v10 2/4] qcow2: add configurations for zoned format extension Sam Li
2026-05-14 19:49 ` Stefan Hajnoczi
2026-05-17 22:21 ` Sam Li
2026-05-19 15:49 ` Stefan Hajnoczi
2026-05-19 15:55 ` Damien Le Moal
2026-05-19 21:20 ` Sam Li
2026-05-20 17:59 ` Stefan Hajnoczi
2026-05-20 18:23 ` Sam Li
2026-05-21 15:18 ` Stefan Hajnoczi
2026-05-18 7:57 ` Markus Armbruster [this message]
2026-05-10 17:50 ` [PATCH v10 3/4] qcow2: add zoned emulation capability Sam Li
2026-05-14 20:23 ` Stefan Hajnoczi
2026-05-10 17:50 ` [PATCH v10 4/4] iotests: test the zoned format feature for qcow2 file Sam Li
2026-05-14 18:38 ` [PATCH v10 0/4] Add full zoned storage emulation to qcow2 driver Stefan Hajnoczi
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=87mrxxw3ot.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=dmitry.fomichev@wdc.com \
--cc=eblake@redhat.com \
--cc=faithilikerun@gmail.com \
--cc=hare@suse.de \
--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.