[RFC PATCH 00/30] qemu: Add generators and tests for format block node layers (blockdev-add saga)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To adopt -blockdev we will need to fully convert virStorageSource into
the format accepted by qemu. This series adds the format layer
(qcow2/raw/etc ...) since the protocol layer is already implemented.

The goal is that we do the equivalent thing with blockdev to what we did
with -drive.

This series also adds a lot of tests to make sure that we generate the
right things.

Note that this series is also a precursor to the NBD+TLS migration
series, although only a small part of the code will be excercised.

Please have a look at the tests. I've anotated them by putting the
equivalent command line which would be used by libvirt into the commit
message.

Note that I've been looking at those JSON snippets for such a long time
that I probably stopped being able to see any differences.

Kevin, please look whether the configurations make sense (specifically
I'm not really sure about patch 14/30, but that resulted from my poking
in qemu.). All JSON documents were validated according to the qemu
schema.

The only known missing piece is the ability to use authentication with
RBD, since that is missing from qemu.

Peter Krempa (30):
  storage: Properly track that backing chain members are readonly
  qemu: domain: Format storage source node names into private data
  util: storage: Add shadow copies of few disk properties to
    virStorageSource
  qemu: domain: Carefuly transfer configuration from disk to storage
    source
  qemu: block: Extract formatting of props for 'file' backend
  qemu: block: Handle iomode property for json 'file' driver
  utils: storage: Mark that a virStorageSource is going to be used as a
    floppy
  qemu: Move virtual FAT disk validation from command line builder
  qemu: block: Add support for accessing directories via the 'vvfat'
    driver
  qemu: block: Propagate 'legacy' parameter when formatting disk backing
  qemu: block: Validate node-names for use with qemu
  qemu: block: Format cache modes for disk storage backends
  qemu: block: Format 'read-only' attribute for JSON disk protocol
  [RFC] qemu: block: Always set discard for storage nodes
  qemu: block: Add support for creating 'format' layer for blockdev-add
  tests: qemublock: Rename variables in anticipation of new tests
  tests: Makefile: Sanitize entry for qemublocktest
  qemu: domain: Export qemuDomainDeviceDefValidateDisk
  qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain
  tests: qemublock: Add testing of blockdev JSON property generator
  tests: qemublock: Add basic 'raw' file test
  tests: qemublock: Add tests for all other format without special
    options
  tests: qemublock: Add tests for basic backing chain formats
  tests: qemublock: Add test-case for the 'vvfat' driver in qemu
  tests: qemublock: Add test cases for 'aio' options of 'file' storage
  tests: qemublock: Add test for raw luks disk format
  tests: qemublock: basic qcow2 tests
  tests: qemublock: Add test combining authentication and encryption
  tests: qemublock: Test handling of 'unmap' and 'detect-zeroes' options
  tests: qemublock: Test handling of all cache modes

 src/conf/domain_conf.c                             |   3 +
 src/qemu/qemu_block.c                              | 422 ++++++++++++++++++++-
 src/qemu/qemu_block.h                              |   6 +-
 src/qemu/qemu_command.c                            |  16 +-
 src/qemu/qemu_domain.c                             |  53 ++-
 src/qemu/qemu_domain.h                             |   3 +
 src/qemu/qemu_driver.c                             |   3 +
 src/util/virstoragefile.c                          |   5 +
 src/util/virstoragefile.h                          |  11 +
 tests/Makefile.am                                  |  11 +-
 tests/qemublocktest.c                              | 312 ++++++++++++++-
 .../qemublocktestdata/xml2json/dir-fat-cache.json  |  22 ++
 tests/qemublocktestdata/xml2json/dir-fat-cache.xml |  10 +
 .../qemublocktestdata/xml2json/dir-fat-floppy.json |  14 +
 .../qemublocktestdata/xml2json/dir-fat-floppy.xml  |  11 +
 .../xml2json/dir-fat-readonly.json                 |  14 +
 .../xml2json/dir-fat-readonly.xml                  |  10 +
 .../xml2json/file-backing_basic-aio_threads.json   |  62 +++
 .../xml2json/file-backing_basic-aio_threads.xml    |  35 ++
 .../file-backing_basic-cache-directsync.json       |  91 +++++
 .../file-backing_basic-cache-directsync.xml        |  35 ++
 .../xml2json/file-backing_basic-cache-none.json    |  91 +++++
 .../xml2json/file-backing_basic-cache-none.xml     |  35 ++
 .../xml2json/file-backing_basic-cache-unsafe.json  |  91 +++++
 .../xml2json/file-backing_basic-cache-unsafe.xml   |  35 ++
 .../file-backing_basic-cache-writeback.json        |  91 +++++
 .../file-backing_basic-cache-writeback.xml         |  35 ++
 .../file-backing_basic-cache-writethrough.json     |  91 +++++
 .../file-backing_basic-cache-writethrough.xml      |  35 ++
 .../xml2json/file-backing_basic-detect.json        |  60 +++
 .../xml2json/file-backing_basic-detect.xml         |  35 ++
 .../xml2json/file-backing_basic-noopts.json        |  51 +++
 .../xml2json/file-backing_basic-noopts.xml         |  34 ++
 .../xml2json/file-backing_basic-unmap-detect.json  |  64 ++++
 .../xml2json/file-backing_basic-unmap-detect.xml   |  35 ++
 .../xml2json/file-backing_basic-unmap-discard.json |   0
 .../xml2json/file-backing_basic-unmap-ignore.json  |  64 ++++
 .../xml2json/file-backing_basic-unmap-ignore.xml   |  35 ++
 .../xml2json/file-backing_basic-unmap.json         |  63 +++
 .../xml2json/file-backing_basic-unmap.xml          |  35 ++
 .../xml2json/file-bochs-noopts.json                |  12 +
 .../xml2json/file-bochs-noopts.xml                 |   9 +
 .../xml2json/file-cloop-noopts.json                |  12 +
 .../xml2json/file-cloop-noopts.xml                 |   9 +
 .../xml2json/file-dmg-noopts.json                  |  12 +
 .../qemublocktestdata/xml2json/file-dmg-noopts.xml |   9 +
 .../xml2json/file-ploop-noopts.json                |  12 +
 .../xml2json/file-ploop-noopts.xml                 |   9 +
 .../file-qcow2-backing-chain-encryption.json       |  34 ++
 .../file-qcow2-backing-chain-encryption.xml        |  25 ++
 .../xml2json/file-qcow2-backing-chain-noopts.json  | 130 +++++++
 .../xml2json/file-qcow2-backing-chain-noopts.xml   |  83 ++++
 .../file-qcow2-backing-chain-unterminated.json     |  25 ++
 .../file-qcow2-backing-chain-unterminated.xml      |  18 +
 .../xml2json/file-raw-aio_native.json              |  21 +
 .../xml2json/file-raw-aio_native.xml               |   9 +
 .../qemublocktestdata/xml2json/file-raw-luks.json  |  13 +
 tests/qemublocktestdata/xml2json/file-raw-luks.xml |  12 +
 .../xml2json/file-raw-noopts.json                  |  12 +
 .../qemublocktestdata/xml2json/file-raw-noopts.xml |   9 +
 .../xml2json/file-vdi-noopts.json                  |  12 +
 .../qemublocktestdata/xml2json/file-vdi-noopts.xml |   9 +
 .../xml2json/file-vhd-noopts.json                  |  12 +
 .../qemublocktestdata/xml2json/file-vhd-noopts.xml |   9 +
 .../xml2json/file-vpc-noopts.json                  |  12 +
 .../qemublocktestdata/xml2json/file-vpc-noopts.xml |   9 +
 .../network-qcow2-backing-chain-cache-unsafe.json  |  57 +++
 .../network-qcow2-backing-chain-cache-unsafe.xml   |  25 ++
 ...etwork-qcow2-backing-chain-encryption_auth.json |  51 +++
 ...network-qcow2-backing-chain-encryption_auth.xml |  34 ++
 .../xml2json/nodename-long-format.xml              |   9 +
 .../xml2json/nodename-long-protocol.xml            |   9 +
 72 files changed, 2816 insertions(+), 36 deletions(-)
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-cache.xml
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-floppy.xml
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly.json
 create mode 100644 tests/qemublocktestdata/xml2json/dir-fat-readonly.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio_threads.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-directsync.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-none.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-none.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-unsafe.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writeback.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-cache-writethrough.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-detect.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-detect.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-detect.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-discard.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap-ignore.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-unmap.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-bochs-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-cloop-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-dmg-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-ploop-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-encryption.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-chain-unterminated.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-aio_native.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-luks.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-raw-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vdi-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vhd-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.json
 create mode 100644 tests/qemublocktestdata/xml2json/file-vpc-noopts.xml
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe.json
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-cache-unsafe.xml
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth.json
 create mode 100644 tests/qemublocktestdata/xml2json/network-qcow2-backing-chain-encryption_auth.xml
 create mode 100644 tests/qemublocktestdata/xml2json/nodename-long-format.xml
 create mode 100644 tests/qemublocktestdata/xml2json/nodename-long-protocol.xml

-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux