[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v4 3/4] qcow2: add zoned emulation capability
From: |
Eric Blake |
Subject: |
Re: [PATCH v4 3/4] qcow2: add zoned emulation capability |
Date: |
Thu, 28 Sep 2023 14:17:12 -0500 |
User-agent: |
NeoMutt/20230517-449-a10573 |
On Mon, Sep 18, 2023 at 05:53:12PM +0800, Sam Li wrote:
> By adding zone operations and zoned metadata, the zoned emulation
> capability enables full emulation support of zoned device using
> a qcow2 file. The zoned device metadata includes zone type,
> zoned device state and write pointer of each zone, which is stored
> to an array of unsigned integers.
>
> Each zone of a zoned device makes state transitions following
> the zone state machine. The zone state machine mainly describes
> five states, IMPLICIT OPEN, EXPLICIT OPEN, FULL, EMPTY and CLOSED.
> READ ONLY and OFFLINE states will generally be affected by device
> internal events. The operations on zones cause corresponding state
> changing.
>
> Zoned devices have a limit on zone resources, which puts constraints on
> write operations into zones.
>
> Signed-off-by: Sam Li <faithilikerun@gmail.com>
> ---
> block/qcow2.c | 709 ++++++++++++++++++++++++++++++++++++++++-
> block/qcow2.h | 2 +
> block/trace-events | 2 +
> docs/interop/qcow2.txt | 6 +
> 4 files changed, 717 insertions(+), 2 deletions(-)
You may want to look at scripts/git.orderfile; putting spec changes
(docs/*) first in your output before implementation is generally
beneficial to reviewers.
> +++ b/docs/interop/qcow2.txt
> @@ -367,6 +367,12 @@ The fields of the zoned extension are:
> The maximal number of 512-byte sectors of a zone
> append request that can be issued to the device.
>
> + 36 - 43: zonedmeta_offset
> + The offset of zoned metadata structure in the file in
> bytes.
For the spec to be useful, you also need to add a section describing
the layout of the zoned metadata structure actually is.
> +
> + 44 - 51: zonedmeta_size
> + The size of zoned metadata in bytes.
> +
Can the zoned metadata structure ever occupy more than 4G, or can this
field be sized at 4 bytes instead of 8?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization: qemu.org | libguestfs.org