Skip to contentSkip to conversation

Add full zoned storage emulation to the qcow2 driver

PATCH Superseded Sam Li 2 participants 10 messages Jun 26 Block layer

v13 of 14 Superseded Latest is v14 →

lore
Share & tools
lore

Sam Li

author
#0 lore raw

v13 cover Add full zoned storage emulation to the qcow2 driver

This patch series add a new extension - zoned format - to the qcow2 driver, allowing full zoned storage emulation on a qcow2 image file. A user can attach such an image to a guest and have it appear as a host-managed zoned block device.

The zoned format is opt-in through a new qcow2 header extension that pins the zone geometry. Behind the extension is a dedicated zoned metadata region that stores one 8-byte write pointer (WP) per zone. The extension is gated by an incompatible bit, so an older qcow2 implementation cannot accidentally open the image.

Each write pointer is routed through the write pointer cache, a Qcow2Cache object. The write pointer cache is written to disk after the qcow2 metadata is written, thus guaranteeing that the write pointer is updated after the corresponding data is written.

Zone states are in memory. Read-only and offline states are device-internal events, which are not modelled in qcow2 emulation for simplicity. The other zone states (closed, empty, full) can be inferred from write poiner values, presistent across QEMU reboots. The open states are kept in memory using open zone lists.

To create a qcow2 file with the zoned format:

    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

Then attach it to a guest via the QEMU command line:

    -blockdev node-name=drive1,driver=qcow2,\
              file.driver=file,file.filename=zbc.qcow2 \
    -device virtio-blk-pci,drive=drive1 \

v12->v13:
- split the zone_size widening to a separate commit [Niklas]
- relocate the qcow2_check_zone_options reorder and max_active/open/append-zones wording [Niklas]
- modify the comment for request merge constraints [Niklas]

v11->v12:
- validate the zoned header extension before allocating any zoned metadata
- fix the zoned locking discipline: hold the qcow2 state lock (s->lock) across all zone-state list updates [Stefan]
- reject, instead of aborting on an assertion, a write that reaches the open-zone limit while every open zone is explicitly open
- fix reduced-capacity (zone_capacity < zone_size) handling:
* transition a zone to FULL when the write pointer reaches the zone capacity
* report the zone capacity, not the zone size, in zone_report
- return -EIO rather than -EINVAL for zone write-rule violations
- use int64_t for the zoned-metadata cluster offset and zone_size to avoid truncation on large images
- simplify qcow2_cache_set_dependency() [Stefan]
- virtio-blk: read the zone size through a new blk_get_zone_size() [Stefan]
- docs/QAPI: clarify the max_open_zones / max_active_zones / max_append_bytes descriptions; use warn_report() for recoverable zoned configuration values in qcow2_check_zone_options() [Niklas, Stefan]
- iotests: add qcow2 check updates (303, qcow2-encryption) [Stefan]
- coding style: function opening braces, DEBUG_EXT format specifier

v10->v11:
- add write ordering through write pointer cache [Stefan]
- add new test cases to iotests for zone append write
- add zoned image info to qemu-img --info
- move virtio-blk cross-zone-boundary merge fix into its own patch [Stefan]
- fix specs and docs:
* document bit 59 conventional-zone marker in qcow2.rst [Stefan]
* spell out write ordering for crash consistency [Stefan]
* QAPI: rephrase comments, bump version [Markus]
- fix review comments [Stefan]

v9->v10:
- add cross-boundary constraint for merging writes on zoned devices
- extract call from assert() to fix image creation crash

v8->v9:
- fix compilation err after modifying types

v7->v8:
- sets default values for zoned img confurations [Markus, Damien]
- changes the type of zone_size, zone_capacity from uint32_t to uint64_t [Stefan]
- fix docs [Stefan]
- modify append writes to increase concurrency [Damien, Stefan]
- use tailqueue to track active zones [Stefan]
- fix undefined behavior of ranges_overlap()
- fix the iotest of case 2(1)

v6->v7:
- modify zone resource managemant (style) [Damien]
- fix accessing list with negative index err
- add some tests for zrm in iotests
- address review comments [Markus]

v5->v6:
- fix docs and specs [Eric, Markus, Stefan]
- add general sanity checks for zoned device configurations while creation and opening [Eric]
- fix LRU when implicitly open a zone for a long time [Stefan]

v4->v5:
- add incompatible bit for zoned format [Eric]
- fix and manage zone resources via LRU [Damien]
- renaming functions and fields, spec changes [Markus, Damien]
- add closed zone list
- make qemu iotests for zoned device consecutive [Stefan]

v3->v4:
- use QLIST for implicit, explicit open zones management [Stefan]
- keep zone states in memory and drop state bits in wp metadata structure [Damien, Stefan]
- change zone resource management and iotests accordingly
- add tracing for number of implicit zones
- address review comments [Stefan, Markus]:
* documentation, config, style

v2->v3:
- drop zoned_profile option [Klaus]
- reformat doc comments of qcow2 [Markus]
- add input validation and checks for zoned information [Stefan]
- code style: format, comments, documentation, naming [Stefan]
- add tracing function for wp tracking [Stefan]
- reconstruct io path in check_zone_resources [Stefan]

v1->v2:
- add more tests to qemu-io zoned commands
- make zone append change state to full when wp reaches end
- add documentation to qcow2 zoned extension header
- address review comments (Stefan):
* fix zoned_mata allocation size
* use bitwise or than addition
* fix wp index overflow and locking
* cleanups: comments, naming

Sam Li (6):
docs/qcow2: add the zoned format feature
block: widen BlockLimits.zone_size to uint64_t
qcow2: add configurations for zoned format extension
virtio-blk: do not merge writes across a zone boundary
qcow2: add zoned emulation capability
iotests: test the zoned format feature for qcow2 file

 block/block-backend.c                         |   11 +
 block/file-posix.c                            |    2 +-
 block/qcow2-cache.c                           |   11 +-
 block/qcow2-refcount.c                        |    7 +
 block/qcow2.c                                 | 1592 ++++++++++++++++-
 block/qcow2.h                                 |   83 +-
 block/trace-events                            |    2 +
 docs/interop/qcow2.rst                        |  120 +-
 docs/system/qemu-block-drivers.rst.inc        |   50 +
 hw/block/virtio-blk.c                         |   22 +-
 include/block/block_int-common.h              |   15 +-
 include/system/block-backend-io.h             |    1 +
 qapi/block-core.json                          |   91 +-
 tests/qemu-iotests/082.out                    |  126 ++
 tests/qemu-iotests/303.out                    |    4 +-
 tests/qemu-iotests/tests/qcow2-encryption.out |    4 +-
 tests/qemu-iotests/tests/zoned-qcow2          |  209 +++
 tests/qemu-iotests/tests/zoned-qcow2.out      |  191 ++
 18 files changed, 2496 insertions(+), 45 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/zoned-qcow2
 create mode 100644 tests/qemu-iotests/tests/zoned-qcow2.out
Signature · 1 line
2.53.0
author
#1 lore raw

PATCH v13 1/6 docs/qcow2: add the zoned format feature

Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information.

---
 docs/system/qemu-block-drivers.rst.inc | 50 ++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
docs/system/qemu-block-drivers.rst.inc +50 -0
index 675daa72f9..19587c515f 100644
@@ -172,6 +172,56 @@ This section describes each format and the options that are supported for it.
     filename`` to check if the NOCOW flag is set or not (Capital 'C' is
     NOCOW flag).
 
+  .. option:: zone.mode
+    If this is set to ``host-managed``, the image is an emulated zoned
+    block device. This option is only valid to emulated zoned device files.
+
+  .. option:: zone.size
+
+    The size of a zone in bytes. The device is divided into zones of this
+    size with the exception of the last zone, which may be smaller.
+    Defaults to ``256 MiB``.
+
+  .. option:: zone.capacity
+
+    The initial capacity value, in bytes, for all zones. The capacity must
+    be less than or equal to zone size. If the last zone is smaller, then
+    its capacity is capped. Defaults to ``zone.size``.
+
+    The zone capacity is per zone and may be different between zones in real
+    devices. QCow2 sets all zones to the same capacity.
+
+  .. option:: zone.conventional_zones
+
+    The number of conventional zones of the zoned device. Defaults to ``0``
+    (all zones are sequential-write-required).
+
+  .. option:: zone.max_active_zones
+
+    The maximum allowed active zones (zones in the implicit open, explicit
+    open, or closed state).
+
+    The max active zones must be less or equal to the number of SWR
+    (sequential write required) zones of the device. Defaults to ``0``,
+    meaning no limit.
+
+  .. option:: zone.max_open_zones
+
+    The maximum allowed open zones (zones in the implicit open or explicit
+    open state). The max open zones must not be larger than the max active
+    zones. Defaults to ``zone.max_active_zones`` if that is set, otherwise
+    ``0`` (no limit).
+
+    If the limits of open zones or active zones are equal to the number of
+    SWR zones, then it is the same as having no limits.
+
+  .. option:: zone.max_append_bytes
+
+    The maximum 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. A value of ``0`` means that zone append requests are not
+    supported. Defaults to ``64 KiB``.
+
 .. program:: image-formats
 .. option:: qed
 
Signature · 1 line
2.53.0
Reviewed-by on v13 1/6
#2 lore raw

Re: [PATCH v13 1/6] docs/qcow2: add the zoned format feature

Quoted 16 lines · Sam Li

Add the specs for the zoned format feature of the qcow2 driver. The qcow2 file then can emulate real zoned devices, either passed through by virtio-blk device or NVMe ZNS drive to the guest given zoned information.

---
 docs/system/qemu-block-drivers.rst.inc | 50 ++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
docs/system/qemu-block-drivers.rst.inc +0 -0
index 675daa72f9..19587c515f 100644

docs/system/qemu-block-drivers.rst.inc This section describes each format and the options that are supported for it. · line 177

Quoted 6 lines
docs/system/qemu-block-drivers.rst.inc +3 -0
@@ -172,6 +172,56 @@ This section describes each format and the options that are supported for it.
     filename`` to check if the NOCOW flag is set or not (Capital 'C' is
     NOCOW flag).
 
+  .. option:: zone.mode
+    If this is set to ``host-managed``, the image is an emulated zoned
+    block device. This option is only valid to emulated zoned device files.

All other options in this file seem to have a newline between "option::" and the actual description.

With a newline added:

Quoted 53 lines
docs/system/qemu-block-drivers.rst.inc +47 -0
+
+  .. option:: zone.size
+
+    The size of a zone in bytes. The device is divided into zones of this
+    size with the exception of the last zone, which may be smaller.
+    Defaults to ``256 MiB``.
+
+  .. option:: zone.capacity
+
+    The initial capacity value, in bytes, for all zones. The capacity must
+    be less than or equal to zone size. If the last zone is smaller, then
+    its capacity is capped. Defaults to ``zone.size``.
+
+    The zone capacity is per zone and may be different between zones in real
+    devices. QCow2 sets all zones to the same capacity.
+
+  .. option:: zone.conventional_zones
+
+    The number of conventional zones of the zoned device. Defaults to ``0``
+    (all zones are sequential-write-required).
+
+  .. option:: zone.max_active_zones
+
+    The maximum allowed active zones (zones in the implicit open, explicit
+    open, or closed state).
+
+    The max active zones must be less or equal to the number of SWR
+    (sequential write required) zones of the device. Defaults to ``0``,
+    meaning no limit.
+
+  .. option:: zone.max_open_zones
+
+    The maximum allowed open zones (zones in the implicit open or explicit
+    open state). The max open zones must not be larger than the max active
+    zones. Defaults to ``zone.max_active_zones`` if that is set, otherwise
+    ``0`` (no limit).
+
+    If the limits of open zones or active zones are equal to the number of
+    SWR zones, then it is the same as having no limits.
+
+  .. option:: zone.max_append_bytes
+
+    The maximum 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. A value of ``0`` means that zone append requests are not
+    supported. Defaults to ``64 KiB``.
+
 .. program:: image-formats
 .. option:: qed
 
Signature · 1 line
2.53.0
author
#3 lore raw

PATCH v13 2/6 block: widen BlockLimits.zone_size to uint64_t

In reply to Sam Li

The zone-size field in BlockLimits is currently uint32_t, capping expressible zone sizes at 4 GiB. Real zoned-device protocols like NVMe ZNS allow larger zones. Widen BlockLimits.zone_size to uint64_t to match.

---
 block/file-posix.c               | 2 +-
 include/block/block_int-common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
block/file-posix.c +1 -1
index 3c985da94f..ddb159c58b 100644
@@ -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;
     }
 
include/block/block_int-common.h +1 -1
index 147c08155f..7571ed9968 100644
@@ -901,7 +901,7 @@ typedef struct BlockLimits {
     BlockZoneModel zoned;
 
     /* zone size expressed in bytes */
-    uint32_t zone_size;
+    uint64_t zone_size;
 
     /* total number of zones */
     uint32_t nr_zones;
Signature · 1 line
2.53.0
Reviewed-by on v13 2/6
#4 lore raw

Re: [PATCH v13 2/6] block: widen BlockLimits.zone_size to uint64_t

Quoted 40 lines · Sam Li

The zone-size field in BlockLimits is currently uint32_t, capping expressible zone sizes at 4 GiB. Real zoned-device protocols like NVMe ZNS allow larger zones. Widen BlockLimits.zone_size to uint64_t to match.

---
 block/file-posix.c               | 2 +-
 include/block/block_int-common.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
block/file-posix.c +1 -1
index 3c985da94f..ddb159c58b 100644
@@ -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;
     }
 
include/block/block_int-common.h +1 -1
index 147c08155f..7571ed9968 100644
@@ -901,7 +901,7 @@ typedef struct BlockLimits {
     BlockZoneModel zoned;
 
     /* zone size expressed in bytes */
-    uint32_t zone_size;
+    uint64_t zone_size;
 
     /* total number of zones */
     uint32_t nr_zones;
Signature · 1 line
2.53.0
author
#5 lore raw

PATCH v13 3/6 qcow2: add configurations for zoned format extension

In reply to Sam Li

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

---
 block/qcow2.c                    | 347 ++++++++++++++++++++++++++++++-
 block/qcow2.h                    |  83 +++++++-
 docs/interop/qcow2.rst           | 120 ++++++++++-
 include/block/block_int-common.h |  13 ++
 qapi/block-core.json             |  91 +++++++-
 tests/qemu-iotests/082.out       | 126 +++++++++++
 6 files changed, 773 insertions(+), 7 deletions(-)
block/qcow2.c +344 -3
index 19271b10a4..d7e421687b 100644
@@ -73,6 +73,7 @@ typedef struct {
 #define  QCOW2_EXT_MAGIC_CRYPTO_HEADER 0x0537be77
 #define  QCOW2_EXT_MAGIC_BITMAPS 0x23852875
 #define  QCOW2_EXT_MAGIC_DATA_FILE 0x44415441
+#define  QCOW2_EXT_MAGIC_ZONED_FORMAT 0x007a6264
 
 static int coroutine_fn
 qcow2_co_preadv_compressed(BlockDriverState *bs,
@@ -194,6 +195,98 @@ qcow2_extract_crypto_opts(QemuOpts *opts, const char *fmt, Error **errp)
     return cryptoopts_qdict;
 }
 
+/*
+ * Returns true if zone_opt is valid, false otherwise.  Fields that are
+ * out of range but recoverable by clamping (e.g. max_open_zones above
+ * the number of SWR zones) emit a warning and are adjusted in place;
+ * fields that have no safe clamp cause a hard error via errp.
+ */
+static bool
+qcow2_check_zone_options(Qcow2ZonedHeaderExtension *zone_opt, Error **errp)
+{
+    uint32_t sequential_zones;
+
+    assert(zone_opt != NULL);
+
+    if (zone_opt->zoned != QCOW2_Z_NONE && zone_opt->zoned != QCOW2_Z_HM) {
+        error_setg(errp, "Zoned extension header zoned field has unknown "
+                   "value %" PRIu8, zone_opt->zoned);
+        return false;
+    }
+
+    if (zone_opt->zone_size == 0) {
+        warn_report("Zoned extension header zone_size field must not be 0");
+        return false;
+    }
+
+    if (!is_power_of_2(zone_opt->zone_size)) {
+        error_setg(errp, "Zoned extension header zone_size %" PRIu64
+                   "B is not a power of 2", zone_opt->zone_size);
+        return false;
+    }
+
+    if (zone_opt->nr_zones > UINT32_MAX / 8) {
+        error_setg(errp, "Zoned extension header nr_zones %" PRIu32
+                   " exceeds maximum %u",
+                   zone_opt->nr_zones, UINT32_MAX / 8);
+        return false;
+    }
+
+    if (zone_opt->zone_capacity > zone_opt->zone_size) {
+        error_setg(errp, "zone capacity %" PRIu64 "B exceeds zone size "
+                   "%" PRIu64 "B", zone_opt->zone_capacity,
+                   zone_opt->zone_size);
+        return false;
+    }
+
+    if (!QEMU_IS_ALIGNED(zone_opt->max_append_bytes, BDRV_SECTOR_SIZE)) {
+        error_setg(errp, "max append bytes %" PRIu32 "B is not aligned "
+                   "to %" PRIu64, zone_opt->max_append_bytes,
+                   (uint64_t)BDRV_SECTOR_SIZE);
+        return false;
+    }
+
+    if (zone_opt->max_append_bytes + BDRV_SECTOR_SIZE >=
+        zone_opt->zone_capacity) {
+        error_setg(errp, "max append bytes %" PRIu32 "B exceeds zone "
+                   "capacity %" PRIu64 "B by more than block size",
+                   zone_opt->max_append_bytes, zone_opt->zone_capacity);
+        return false;
+    }
+
+    if (zone_opt->conventional_zones >= zone_opt->nr_zones) {
+        error_setg(errp, "Conventional_zones %" PRIu32 " exceeds "
+                   "nr_zones %" PRIu32 ".",
+                   zone_opt->conventional_zones, zone_opt->nr_zones);
+        return false;
+    }
+
+    if (zone_opt->max_active_zones > zone_opt->nr_zones) {
+        warn_report("max_active_zones %" PRIu32 " exceeds nr_zones %" PRIu32
+                    ", clamping to nr_zones",
+                    zone_opt->max_active_zones, zone_opt->nr_zones);
+        zone_opt->max_active_zones = zone_opt->nr_zones;
+    }
+
+    sequential_zones = zone_opt->nr_zones - zone_opt->conventional_zones;
+    if (zone_opt->max_open_zones > sequential_zones) {
+        warn_report("max_open_zones %" PRIu32 " exceeds the number of SWR "
+                    "zones, clamping to %" PRIu32,
+                    zone_opt->max_open_zones, sequential_zones);
+        zone_opt->max_open_zones = sequential_zones;
+    }
+    if (zone_opt->max_active_zones != 0 &&
+        zone_opt->max_open_zones > zone_opt->max_active_zones) {
+        warn_report("max_open_zones %" PRIu32 " exceeds max_active_zones "
+                    "%" PRIu32 ", clamping to max_active_zones",
+                    zone_opt->max_open_zones,
+                    zone_opt->max_active_zones);
+        zone_opt->max_open_zones = zone_opt->max_active_zones;
+    }
+
+    return true;
+}
+
 /*
  * read qcow2 extension and fill bs
  * start reading from start_offset
@@ -211,6 +304,7 @@ qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset,
     uint64_t offset;
     int ret;
     Qcow2BitmapHeaderExt bitmaps_ext;
+    Qcow2ZonedHeaderExtension zoned_ext;
 
     if (need_update_header != NULL) {
         *need_update_header = false;
@@ -432,6 +526,62 @@ qcow2_read_extensions(BlockDriverState *bs, uint64_t start_offset,
             break;
         }
 
+        case QCOW2_EXT_MAGIC_ZONED_FORMAT:
+        {
+            if (ext.len != sizeof(zoned_ext)) {
+                error_setg(errp, "zoned_ext: unexpected len=%" PRIu32 " "
+                           "(expected %zu)", ext.len, sizeof(zoned_ext));
+                return -EINVAL;
+            }
+            ret = bdrv_pread(bs->file, offset, ext.len, &zoned_ext, 0);
+            if (ret < 0) {
+                error_setg_errno(errp, -ret, "zoned_ext: "
+                                 "Could not read ext header");
+                return ret;
+            }
+
+            zoned_ext.zone_size = be64_to_cpu(zoned_ext.zone_size);
+            zoned_ext.zone_capacity = be64_to_cpu(zoned_ext.zone_capacity);
+            zoned_ext.conventional_zones =
+                be32_to_cpu(zoned_ext.conventional_zones);
+            zoned_ext.nr_zones = be32_to_cpu(zoned_ext.nr_zones);
+            zoned_ext.max_open_zones = be32_to_cpu(zoned_ext.max_open_zones);
+            zoned_ext.max_active_zones =
+                be32_to_cpu(zoned_ext.max_active_zones);
+            zoned_ext.max_append_bytes =
+                be32_to_cpu(zoned_ext.max_append_bytes);
+            s->zoned_header = zoned_ext;
+
+            /* validate the header first */
+            if (!qcow2_check_zone_options(&zoned_ext, errp)) {
+                return -EINVAL;
+            }
+            /*
+             * refuse to open broken images: reject untrusted total_sectors
+             * that would overflow when converted to bytes, then verify
+             * nr_zones matches the device size.
+             */
+            if (bs->total_sectors < 0 ||
+                (uint64_t)bs->total_sectors > UINT64_MAX / BDRV_SECTOR_SIZE) {
+                error_setg(errp, "Image size overflows when converted "
+                           "to bytes");
+                return -EINVAL;
+            }
+            if (zoned_ext.nr_zones != DIV_ROUND_UP(
+                    (uint64_t)bs->total_sectors * BDRV_SECTOR_SIZE,
+                    zoned_ext.zone_size)) {
+                error_setg(errp, "Zoned extension header nr_zones field "
+                           "is wrong");
+                return -EINVAL;
+            }
+
+#ifdef DEBUG_EXT
+            printf("Qcow2: Got zoned format extension: "
+                   "offset=%" PRIu64 "\n", offset);
+#endif
+            break;
+        }
+
         default:
             /* unknown magic - save it in case we need to rewrite the header */
             /* If you add a new feature, make sure to also update the fast
@@ -2068,6 +2218,25 @@ static void qcow2_refresh_limits(BlockDriverState *bs, Error **errp)
     }
     bs->bl.pwrite_zeroes_alignment = s->subcluster_size;
     bs->bl.pdiscard_alignment = s->cluster_size;
+
+    switch (s->zoned_header.zoned) {
+    case QCOW2_Z_HM:
+        bs->bl.zoned = BLK_Z_HM;
+        break;
+    case QCOW2_Z_NONE:
+    default:
+        bs->bl.zoned = BLK_Z_NONE;
+        break;
+    }
+
+    bs->bl.nr_zones = s->zoned_header.nr_zones;
+    bs->bl.max_append_sectors = s->zoned_header.max_append_bytes
+        >> BDRV_SECTOR_BITS;
+    bs->bl.max_active_zones = s->zoned_header.max_active_zones;
+    bs->bl.max_open_zones = s->zoned_header.max_open_zones;
+    bs->bl.zone_size = s->zoned_header.zone_size;
+    bs->bl.zone_capacity = s->zoned_header.zone_capacity;
+    bs->bl.write_granularity = BDRV_SECTOR_SIZE;
 }
 
 static int GRAPH_UNLOCKED
@@ -3170,6 +3339,11 @@ int qcow2_update_header(BlockDriverState *bs)
                 .bit  = QCOW2_INCOMPAT_EXTL2_BITNR,
                 .name = "extended L2 entries",
             },
+            {
+                .type = QCOW2_FEAT_TYPE_INCOMPATIBLE,
+                .bit  = QCOW2_INCOMPAT_ZONED_FORMAT_BITNR,
+                .name = "zoned format",
+            },
             {
                 .type = QCOW2_FEAT_TYPE_COMPATIBLE,
                 .bit  = QCOW2_COMPAT_LAZY_REFCOUNTS_BITNR,
@@ -3215,6 +3389,31 @@ int qcow2_update_header(BlockDriverState *bs)
         buflen -= ret;
     }
 
+    /* Zoned devices header extension */
+    if (s->zoned_header.zoned == QCOW2_Z_HM) {
+        Qcow2ZonedHeaderExtension zoned_header = {
+            .zoned              = s->zoned_header.zoned,
+            .zone_size          = cpu_to_be64(s->zoned_header.zone_size),
+            .zone_capacity      = cpu_to_be64(s->zoned_header.zone_capacity),
+            .conventional_zones =
+                cpu_to_be32(s->zoned_header.conventional_zones),
+            .nr_zones           = cpu_to_be32(s->zoned_header.nr_zones),
+            .max_open_zones     = cpu_to_be32(s->zoned_header.max_open_zones),
+            .max_active_zones   =
+                cpu_to_be32(s->zoned_header.max_active_zones),
+            .max_append_bytes =
+                cpu_to_be32(s->zoned_header.max_append_bytes)
+        };
+        ret = header_ext_add(buf, QCOW2_EXT_MAGIC_ZONED_FORMAT,
+                             &zoned_header, sizeof(zoned_header),
+                             buflen);
+        if (ret < 0) {
+            goto fail;
+        }
+        buf += ret;
+        buflen -= ret;
+    }
+
     /* Keep unknown header extensions */
     QLIST_FOREACH(uext, &s->unknown_header_ext, next) {
         ret = header_ext_add(buf, uext->magic, uext->data, uext->len, buflen);
@@ -3589,6 +3788,8 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
     ERRP_GUARD();
     BlockdevCreateOptionsQcow2 *qcow2_opts;
     QDict *options;
+    Qcow2ZoneCreateOptions *zone_struct;
+    Qcow2ZoneHostManaged *zone_host_managed;
 
     /*
      * Open the image file and write a minimal qcow2 header.
@@ -3615,6 +3816,8 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
 
     assert(create_options->driver == BLOCKDEV_DRIVER_QCOW2);
     qcow2_opts = &create_options->u.qcow2;
+    zone_struct = qcow2_opts->zone;
+    zone_host_managed = NULL;
 
     bs = bdrv_co_open_blockdev_ref(qcow2_opts->file, errp);
     if (bs == NULL) {
@@ -3828,6 +4031,14 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
         header->incompatible_features |=
             cpu_to_be64(QCOW2_INCOMPAT_DATA_FILE);
     }
+    if (zone_struct && zone_struct->mode == QCOW2_ZONE_MODEL_HOST_MANAGED) {
+        /*
+         * The incompatible bit must be set when the zone model is
+         * host-managed
+         */
+        header->incompatible_features |=
+            cpu_to_be64(QCOW2_INCOMPAT_ZONED_FORMAT);
+    }
     if (qcow2_opts->data_file_raw) {
         header->autoclear_features |=
             cpu_to_be64(QCOW2_AUTOCLEAR_DATA_FILE_RAW);
@@ -3885,10 +4096,9 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
     bdrv_graph_co_rdlock();
     ret = qcow2_alloc_clusters(blk_bs(blk), 3 * cluster_size);
     if (ret < 0) {
-        bdrv_graph_co_rdunlock();
         error_setg_errno(errp, -ret, "Could not allocate clusters for qcow2 "
                          "header and refcount table");
-        goto out;
+        goto unlock;
 
     } else if (ret != 0) {
         error_report("Huh, first cluster in empty image is already in use?");
@@ -3896,11 +4106,77 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
     }
 
     /* Set the external data file if necessary */
+    BDRVQcow2State *s = blk_bs(blk)->opaque;
     if (data_bs) {
-        BDRVQcow2State *s = blk_bs(blk)->opaque;
         s->image_data_file = g_strdup(data_bs->filename);
     }
 
+    if (zone_struct && zone_struct->mode == QCOW2_ZONE_MODEL_HOST_MANAGED) {
+        s->zoned_header.zoned = QCOW2_Z_HM;
+        zone_host_managed = &zone_struct->u.host_managed;
+
+        if (zone_host_managed->has_size) {
+            s->zoned_header.zone_size = zone_host_managed->size;
+        } else {
+            s->zoned_header.zone_size = DEFAULT_ZONE_SIZE;
+        }
+
+        if (s->zoned_header.zone_size == 0) {
+            error_setg(errp, "Zoned extension header zone_size field "
+                       "can not be 0");
+            s->zoned_header.zoned = QCOW2_Z_NONE;
+            ret = -EINVAL;
+            goto unlock;
+        }
+        s->zoned_header.nr_zones = DIV_ROUND_UP(qcow2_opts->size,
+                                                s->zoned_header.zone_size);
+
+        if (zone_host_managed->has_capacity) {
+            s->zoned_header.zone_capacity = zone_host_managed->capacity;
+        } else {
+            s->zoned_header.zone_capacity = s->zoned_header.zone_size;
+        }
+
+        if (zone_host_managed->has_conventional_zones) {
+            s->zoned_header.conventional_zones =
+                zone_host_managed->conventional_zones;
+        } else {
+            s->zoned_header.conventional_zones = 0;
+        }
+
+        if (zone_host_managed->has_max_active_zones) {
+            s->zoned_header.max_active_zones =
+                zone_host_managed->max_active_zones;
+        } else {
+            s->zoned_header.max_active_zones = 0;
+        }
+
+        if (zone_host_managed->has_max_open_zones) {
+            s->zoned_header.max_open_zones =
+                zone_host_managed->max_open_zones;
+        } else if (zone_host_managed->has_max_active_zones) {
+            s->zoned_header.max_open_zones =
+                zone_host_managed->max_active_zones;
+        } else {
+            s->zoned_header.max_open_zones = 0;
+        }
+
+        if (zone_host_managed->has_max_append_bytes) {
+            s->zoned_header.max_append_bytes =
+                    zone_host_managed->max_append_bytes;
+        } else {
+            s->zoned_header.max_append_bytes = DEFAULT_ZONE_MAX_APPEND_BYTES;
+        }
+
+        if (!qcow2_check_zone_options(&s->zoned_header, errp)) {
+            s->zoned_header.zoned = QCOW2_Z_NONE;
+            ret = -EINVAL;
+            goto unlock;
+        }
+    } else {
+        s->zoned_header.zoned = QCOW2_Z_NONE;
+    }
+
     /* Create a full header (including things like feature table) */
     ret = qcow2_update_header(blk_bs(blk));
     bdrv_graph_co_rdunlock();
@@ -3974,6 +4250,9 @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp)
     }
 
     ret = 0;
+    goto out;
+unlock:
+    bdrv_graph_co_rdunlock();
 out:
     blk_co_unref(blk);
     bdrv_co_unref(bs);
@@ -4052,6 +4331,10 @@ qcow2_co_create_opts(BlockDriver *drv, const char *filename, QemuOpts *opts,
         { BLOCK_OPT_COMPAT_LEVEL,       "version" },
         { BLOCK_OPT_DATA_FILE_RAW,      "data-file-raw" },
         { BLOCK_OPT_COMPRESSION_TYPE,   "compression-type" },
+        { BLOCK_OPT_CONVENTIONAL_ZONES, "zone.conventional-zones" },
+        { BLOCK_OPT_MAX_OPEN_ZONES,     "zone.max-open-zones" },
+        { BLOCK_OPT_MAX_ACTIVE_ZONES,   "zone.max-active-zones" },
+        { BLOCK_OPT_MAX_APPEND_BYTES,   "zone.max-append-bytes" },
         { NULL, NULL },
     };
 
@@ -5448,6 +5731,29 @@ qcow2_get_specific_info(BlockDriverState *bs, Error **errp)
             .data_file_raw      = data_file_is_raw(bs),
             .compression_type   = s->compression_type,
         };
+        if (s->zoned_header.zoned == QCOW2_Z_HM) {
+            ImageInfoSpecificQCow2Zoned *z =
+                g_new0(ImageInfoSpecificQCow2Zoned, 1);
+            *z = (ImageInfoSpecificQCow2Zoned){
+                .mode = QCOW2_ZONE_MODEL_HOST_MANAGED,
+                .nr_zones = s->zoned_header.nr_zones,
+                .u.host_managed = {
+                    .has_size = true,
+                    .size = s->zoned_header.zone_size,
+                    .has_capacity = true,
+                    .capacity = s->zoned_header.zone_capacity,
+                    .has_conventional_zones = true,
+                    .conventional_zones = s->zoned_header.conventional_zones,
+                    .has_max_open_zones = true,
+                    .max_open_zones = s->zoned_header.max_open_zones,
+                    .has_max_active_zones = true,
+                    .max_active_zones = s->zoned_header.max_active_zones,
+                    .has_max_append_bytes = true,
+                    .max_append_bytes = s->zoned_header.max_append_bytes,
+                },
+            };
+            spec_info->u.qcow2.data->zone = z;
+        }
     } else {
         /* if this assertion fails, this probably means a new version was
          * added without having it covered here */
@@ -6271,6 +6577,41 @@ static QemuOptsList qcow2_create_opts = {
             .type = QEMU_OPT_BOOL,                                      \
             .help = "Assume the external data file already exists and " \
                     "do not overwrite it"                               \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_ZONE_MODEL,                               \
+            .type = QEMU_OPT_STRING,                                    \
+            .help = "zone model modes, mode choice: host-managed",      \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_ZONE_SIZE,                                \
+            .type = QEMU_OPT_SIZE,                                      \
+            .help = "zone size",                                        \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_ZONE_CAPACITY,                            \
+            .type = QEMU_OPT_SIZE,                                      \
+            .help = "zone capacity",                                    \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_CONVENTIONAL_ZONES,                       \
+            .type = QEMU_OPT_NUMBER,                                    \
+            .help = "numbers of conventional zones",                    \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_MAX_APPEND_BYTES,                         \
+            .type = QEMU_OPT_SIZE,                                      \
+            .help = "max append bytes",                                 \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_MAX_ACTIVE_ZONES,                         \
+            .type = QEMU_OPT_NUMBER,                                    \
+            .help = "max active zones",                                 \
+        },                                                              \
+        {                                                               \
+            .name = BLOCK_OPT_MAX_OPEN_ZONES,                           \
+            .type = QEMU_OPT_NUMBER,                                    \
+            .help = "max open zones",                                   \
         },
         QCOW_COMMON_OPTIONS,
         { /* end of list */ }
block/qcow2.h +82 -1

117 lines not on this page · raw message

docs/interop/qcow2.rst +119 -1

138 lines not on this page · raw message

include/block/block_int-common.h +13 -0
index 7571ed9968..349876bc65 100644
@@ -57,6 +57,13 @@
 #define BLOCK_OPT_COMPRESSION_TYPE  "compression_type"
 #define BLOCK_OPT_EXTL2             "extended_l2"
 #define BLOCK_OPT_KEEP_DATA_FILE    "keep_data_file"
+#define BLOCK_OPT_ZONE_MODEL        "zone.mode"
+#define BLOCK_OPT_ZONE_SIZE         "zone.size"
+#define BLOCK_OPT_ZONE_CAPACITY     "zone.capacity"
+#define BLOCK_OPT_CONVENTIONAL_ZONES    "zone.conventional_zones"
+#define BLOCK_OPT_MAX_APPEND_BYTES      "zone.max_append_bytes"
+#define BLOCK_OPT_MAX_ACTIVE_ZONES      "zone.max_active_zones"
+#define BLOCK_OPT_MAX_OPEN_ZONES        "zone.max_open_zones"
 
 #define BLOCK_PROBE_BUF_SIZE        512
 
@@ -903,6 +910,12 @@ typedef struct BlockLimits {
     /* zone size expressed in bytes */
     uint64_t zone_size;
 
+    /*
+     * The number of usable logical blocks within the zone, expressed
+     * in bytes. A zone capacity is smaller or equal to the zone size.
+     */
+    uint64_t zone_capacity;
+
     /* total number of zones */
     uint32_t nr_zones;
 
qapi/block-core.json +89 -2

121 lines not on this page · raw message

tests/qemu-iotests/082.out +126 -0

234 lines not on this page · raw message

Signature · 1 line
2.53.0
author
#6 lore raw

PATCH v13 4/6 virtio-blk: do not merge writes across a zone boundary

In reply to Sam Li

virtio_blk_submit_multireq() fuses adjacent in-zone requests into a single request. On a zoned backend, a merged zone append request that straddles a zone boundary is rejected by the device because each write must stay within a single zone.

Add a bail condition to the merge coalescer: if combining the candidate request into the current batch would cross a zone boundary, flush the current batch and start a new one.

---
 block/block-backend.c             | 11 +++++++++++
 hw/block/virtio-blk.c             | 22 +++++++++++++++++++++-
 include/system/block-backend-io.h |  1 +
 3 files changed, 33 insertions(+), 1 deletion(-)
block/block-backend.c +11 -0
index 37ba7e9fc4..049e70ddcb 100644
@@ -2326,6 +2326,17 @@ uint32_t blk_get_request_alignment(BlockBackend *blk)
     return bs ? bs->bl.request_alignment : BDRV_SECTOR_SIZE;
 }
 
+/*
+ * Returns the zone size in bytes for a zoned backend, or 0 if @blk does
+ * not present zoned geometry.
+ */
+uint64_t blk_get_zone_size(BlockBackend *blk)
+{
+    BlockDriverState *bs = blk_bs(blk);
+    IO_CODE();
+    return bs ? bs->bl.zone_size : 0;
+}
+
 /* Returns the optimal write zeroes alignment, in bytes; guaranteed nonzero */
 uint32_t blk_get_pwrite_zeroes_alignment(BlockBackend *blk)
 {
hw/block/virtio-blk.c +21 -1
index 6b92066aff..f74cc3dbd0 100644
@@ -294,6 +294,9 @@ static void virtio_blk_submit_multireq(VirtIOBlock *s, MultiReqBuffer *mrb)
     int i = 0, start = 0, num_reqs = 0, niov = 0, nb_sectors = 0;
     uint32_t max_transfer;
     int64_t sector_num = 0;
+    uint64_t zone_size = blk_get_zone_size(s->blk);
+    bool zone_cross;
+    int64_t zone_sector, end_sector;
 
     if (mrb->num_reqs == 1) {
         submit_requests(s, mrb, 0, 1, -1);
@@ -309,17 +312,34 @@ static void virtio_blk_submit_multireq(VirtIOBlock *s, MultiReqBuffer *mrb)
     for (i = 0; i < mrb->num_reqs; i++) {
         VirtIOBlockReq *req = mrb->reqs[i];
         if (num_reqs > 0) {
+            zone_cross = false;
+
+            /*
+             * On zoned backends, a single backend write/read must not span
+             * a zone boundary. Bail out of merging if combining req into
+             * the current batch would straddle a zone.
+             */
+            if (zone_size > 0) {
+                zone_sector = zone_size / BDRV_SECTOR_SIZE;
+                end_sector = req->sector_num
+                                + req->qiov.size / BDRV_SECTOR_SIZE - 1;
+                zone_cross = (sector_num / zone_sector) !=
+                             (end_sector / zone_sector);
+            }
+
             /*
              * NOTE: We cannot merge the requests in below situations:
              * 1. requests are not sequential
              * 2. merge would exceed maximum number of IOVs
              * 3. merge would exceed maximum transfer length of backend device
+             * 4. merge would cross a zone boundary on a zoned backend
              */
             if (sector_num + nb_sectors != req->sector_num ||
                 niov > blk_get_max_iov(s->blk) - req->qiov.niov ||
                 req->qiov.size > max_transfer ||
                 nb_sectors > (max_transfer -
-                              req->qiov.size) / BDRV_SECTOR_SIZE) {
+                              req->qiov.size) / BDRV_SECTOR_SIZE ||
+                zone_cross) {
                 submit_requests(s, mrb, start, num_reqs, niov);
                 num_reqs = 0;
             }
include/system/block-backend-io.h +1 -0
index fd84723d9d..78d410b8df 100644
@@ -121,6 +121,7 @@ uint32_t blk_get_request_alignment(BlockBackend *blk);
 uint32_t blk_get_pwrite_zeroes_alignment(BlockBackend *blk);
 uint32_t blk_get_max_transfer(BlockBackend *blk);
 uint64_t blk_get_max_hw_transfer(BlockBackend *blk);
+uint64_t blk_get_zone_size(BlockBackend *blk);
 
 int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
                                    BlockBackend *blk_out, int64_t off_out,
Signature · 1 line
2.53.0
Reviewed-by on v13 4/6
#7 lore raw

Re: [PATCH v13 4/6] virtio-blk: do not merge writes across a zone boundary

Quoted 5 lines · Sam Li

virtio_blk_submit_multireq() fuses adjacent in-zone requests into a single request. On a zoned backend, a merged zone append request that straddles a zone boundary is rejected by the device because each write must stay within a single zone.

Quoted 7 lines

Add a bail condition to the merge coalescer: if combining the candidate request into the current batch would cross a zone boundary, flush the current batch and start a new one.

---

author
#8 lore raw

PATCH v13 5/6 qcow2: add zoned emulation capability

In reply to Sam Li

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 (WP) of each zone, which is stored to an array of unsigned integers.

WP accessor (qcow2_rw_wp_at) routes reads and writes of an 8-byte WP slot through the write pointer cache. The write pointer cache is written to disk after the qcow2 metadata is written, thus guaranteeing that the write pointer is updated after the corresponding data is written. Per-completion cache flush is deferred. The WP cluster reaches disk on the next flush.

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 limits on zone resources, which put constraints on write operations on zones. It is managed by active zone queues following LRU policy.

---
 block/qcow2-cache.c    |   11 +-
 block/qcow2-refcount.c |    7 +
 block/qcow2.c          | 1195 +++++++++++++++++++++++++++++++++++++++-
 block/trace-events     |    2 +
 4 files changed, 1209 insertions(+), 6 deletions(-)
block/qcow2-cache.c +10 -1
index 23d9588b08..73f2be3641 100644
@@ -275,14 +275,23 @@ int qcow2_cache_set_dependency(BlockDriverState *bs, Qcow2Cache *c,
 {
     int ret;
 
+    /*
+     * If the dependency graph is unchanged, nothing to do. This avoids
+     * a synchronous flush on every call below.
+     */
+    if (c->depends == dependency) {
+        return 0;
+    }
+
     if (dependency->depends) {
+        /* Flatten any chain on the dependency side as a cycle-breaker. */
         ret = qcow2_cache_flush_dependency(bs, dependency);
         if (ret < 0) {
             return ret;
         }
     }
 
-    if (c->depends && (c->depends != dependency)) {
+    if (c->depends) {
         ret = qcow2_cache_flush_dependency(bs, c);
         if (ret < 0) {
             return ret;
block/qcow2-refcount.c +7 -0
index 6512cda407..f551726609 100644
@@ -1239,6 +1239,13 @@ int qcow2_write_caches(BlockDriverState *bs)
         }
     }
 
+    if (s->wp_cache) {
+        ret = qcow2_cache_write(bs, s->wp_cache);
+        if (ret < 0) {
+            return ret;
+        }
+    }
+
     return 0;
 }
 
block/qcow2.c +1190 -5

1,296 lines not on this page · raw message

block/trace-events +2 -0
index 950c82d4b8..30a3e303ca 100644
@@ -76,6 +76,8 @@ qcow2_writev_data(void *co, uint64_t offset) "co %p offset 0x%" PRIx64
 qcow2_pwrite_zeroes_start_req(void *co, int64_t offset, int64_t bytes) "co %p offset 0x%" PRIx64 " bytes %" PRId64
 qcow2_pwrite_zeroes(void *co, int64_t offset, int64_t bytes) "co %p offset 0x%" PRIx64 " bytes %" PRId64
 qcow2_skip_cow(void *co, uint64_t offset, int nb_clusters) "co %p offset 0x%" PRIx64 " nb_clusters %d"
+qcow2_wp_tracking(int index, uint64_t wp) "wps[%d]: 0x%" PRIx64
+qcow2_imp_open_zones(uint8_t op, int nrz) "nr_imp_open_zones after op 0x%x: %d"
 
 # qcow2-cluster.c
 qcow2_alloc_clusters_offset(void *co, uint64_t offset, int bytes) "co %p offset 0x%" PRIx64 " bytes %d"
Signature · 1 line
2.53.0
author
#9 lore raw

PATCH v13 6/6 iotests: test the zoned format feature for qcow2 file

In reply to Sam Li

The zoned format feature can be tested by:

$ tests/qemu-iotests/check -qcow2 zoned-qcow2
---
 tests/qemu-iotests/303.out                    |   4 +-
 tests/qemu-iotests/tests/qcow2-encryption.out |   4 +-
 tests/qemu-iotests/tests/zoned-qcow2          | 209 ++++++++++++++++++
 tests/qemu-iotests/tests/zoned-qcow2.out      | 191 ++++++++++++++++
 4 files changed, 404 insertions(+), 4 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/zoned-qcow2
 create mode 100644 tests/qemu-iotests/tests/zoned-qcow2.out
tests/qemu-iotests/303.out +2 -2
index b3c70827b7..684a481cae 100644
@@ -47,7 +47,7 @@ header_length             112
 
 Header extension:
 magic                     0x6803f857 (Feature table)
-length                    384
+length                    432
 data                      <binary>
 
 Header extension:
@@ -133,7 +133,7 @@ wrote 1048576/1048576 bytes at offset 7340032
     {
         "name": "Feature table",
         "magic": 1745090647,
-        "length": 384,
+        "length": 432,
         "data_str": "<binary>"
     },
     {
tests/qemu-iotests/tests/qcow2-encryption.out +2 -2
index 9b549dc2ab..8be3e57f6e 100644
@@ -10,7 +10,7 @@ data                      <binary>
 
 Header extension:
 magic                     0x6803f857 (Feature table)
-length                    384
+length                    432
 data                      <binary>
 
 image: TEST_DIR/t.IMGFMT
@@ -24,7 +24,7 @@ No errors were found on the image.
 
 Header extension:
 magic                     0x6803f857 (Feature table)
-length                    384
+length                    432
 data                      <binary>
 
 qemu-img: Could not open 'TEST_DIR/t.IMGFMT': Missing CRYPTO header for crypt method 2
tests/qemu-iotests/tests/zoned-qcow2 new file +209 -0

209 lines not on this page · raw message

tests/qemu-iotests/tests/zoned-qcow2.out new file +191 -0

191 lines not on this page · raw message

Signature · 1 line
2.53.0