mbox series

[RFC,0/4] Add full zoned storage emulation to qcow2 driver

Message ID 20230605104108.125270-1-faithilikerun@gmail.com (mailing list archive)
Headers show
Series Add full zoned storage emulation to qcow2 driver | expand

Message

Sam Li June 5, 2023, 10:41 a.m. UTC
This patch series add a new extension - zoned format - to the
qcow2 driver thereby allowing full zoned storage emulation on
the qcow2 img file. Users can attach such a qcow2 file to the
guest as a zoned device.

To create a qcow2 file with zoned format, use command like this:
    $ qemu-img create -f qcow2 test.qcow2 -o size=768M -o
    zone_size=64M -o zone_capacity=64M -o zone_nr_conv=0 -o
    max_append_sectors=512 -o max_open_zones=0 -o max_active_zones=0
     -o zoned_profile=zbc

Then add it to the QEMU command line:
    -blockdev node-name=drive1,driver=qcow2,file.driver=file,file.filename=../qemu/test.qcow2 \
    -device virtio-blk-pci,drive=drive1 \

Sam Li (4):
  docs/qcow2: add the zoned format feature
  qcow2: add configurations for zoned format extension
  qcow2: add zoned emulation capability
  iotests: test the zoned format feature for qcow2 file

 block/qcow2.c                            | 746 ++++++++++++++++++++++-
 block/qcow2.h                            |  23 +
 docs/system/qemu-block-drivers.rst.inc   |  31 +
 include/block/block-common.h             |   5 +
 include/block/block_int-common.h         |   8 +
 qapi/block-core.json                     |  46 +-
 tests/qemu-iotests/tests/zoned-qcow2     | 110 ++++
 tests/qemu-iotests/tests/zoned-qcow2.out |  87 +++
 8 files changed, 1041 insertions(+), 15 deletions(-)
 create mode 100755 tests/qemu-iotests/tests/zoned-qcow2
 create mode 100644 tests/qemu-iotests/tests/zoned-qcow2.out