[libvirt] [PATCH 00/34] conf: refactor virStorageSource parsing and formatting (blockdev-add saga)

Peter Krempa posted 34 patches 12 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1552924269.git.pkrempa@redhat.com
Test syntax-check passed
docs/schemas/domaincommon.rng                 |   1 +
src/conf/domain_conf.c                        | 494 ++++++++++--------
src/conf/domain_conf.h                        |  32 +-
src/conf/snapshot_conf.c                      |  40 +-
src/libvirt_private.syms                      |   4 +-
src/qemu/qemu_domain.c                        | 104 +---
src/util/virxml.h                             |   3 +
tests/qemublocktest.c                         | 179 +++----
.../blockjob-mirror-in.xml                    |  13 +
.../qemuxml2argvdata/disk-backing-chains.xml  |   6 +-
tests/qemuxml2argvdata/disk-mirror.xml        |   8 +-
.../disk-backing-chains-active.xml            |   6 +-
.../disk-backing-chains-inactive.xml          |   6 +-
.../qemuxml2xmloutdata/disk-mirror-active.xml |   8 +-
tests/virstoragetest.c                        |   2 +-
15 files changed, 443 insertions(+), 463 deletions(-)

[libvirt] [PATCH 00/34] conf: refactor virStorageSource parsing and formatting (blockdev-add saga)

Posted by Peter Krempa 12 weeks ago
Simplify parsing and formatting of virStorageSource into/from XML. This
series contains the refactors which unify the various parsers into one
with a neat cleanup.

The plan is to reuse the parser for parsing job backing chains when the
disk frontend will be unplugged by the guest so that we don't lose track
of the backing chain members.

This series adds support for backing chain of the <mirror> subelement
which has a similar reason. If we open a user-formatted file
(--reuse-external) and do a shallow copy into it we will need to keep
around the backing chain for that as well. It feels fitting to format
the backing chain under <mirror> as it might become the disk source
later.

Peter Krempa (34):
  conf: Invert 'skipSeclabels' argument of
    virDomainDiskSourceFormatInternal
  conf: Move formatting of 'index' and 'startupPolicy' for
    virStorageSource
  conf: Introduce virDomainStorageSourceFormatFull
  qemu: domain: Replace qemuDomainObjPrivateXMLFormatNBDMigrationSource
  conf: Unexport virDomainStorageSourceFormat
  conf: domain: Merge virDomainDiskSourceFormatInternal into the wrapper
  conf: Simplify control flow in virDomainDiskSourceFormat
  conf: Avoid temporary variable in virDomainDiskBackingStoreFormat
  conf: Use virXMLFormatElement in virDomainDiskBackingStoreFormat
  conf: Move virDomainDiskBackingStoreFormat up to avoid forward
    declarations
  conf: Move backingStore formating into virDomainDiskSourceFormat
  conf: Add possibility to format full chain with
    virDomainStorageSourceFormatFull
  conf: Simplify error paths in storage source component parsers
  cleanup error path in virDomainStorageSourceParse
  util: xml: Introduce VIR_AUTOPTR functions for xmlDoc and
    xmlXPathContext
  tests: Use full force of our VIR_AUTO* machinery in
    testBackingXMLjsonXML
  tests: Refactor control flow in testBackingXMLjsonXML
  conf: Refactor control flow in virDomainDiskBackingStoreParse
  conf: Fold private data parsing into virDomainStorageSourceParse
  conf: Introduce modular parser for virStorageSource
  qemu: Use virDomainStorageSourceParseFull when parsing NBD migration
    data
  conf: Unexport virDomainStorageSourceParse
  tests: qemublock: Use new source formatter and parser in
    testBackingXMLjsonXML
  conf: snapshot: Use virDomainStorageSourceParseFull for snapshots
  conf: Replace virDomainDiskSourceParse by virDomainStorageSourceParse
  conf: Use virDomainStorageSourceParseFull in
    virDomainDiskBackingStoreParse
  conf: Use virDomainStorageSourceParseFull to parse disk source in
    virDomainDiskDefParseXML
  conf: Use virDomainStorageSourceParseFull in
    virDomainDiskDefMirrorParse
  conf: Parse <backingStore> in virDomainStorageSourceParseFull
  conf: Parse and format 'backingStore' for disk <mirror>
  conf: Add 'index' attribute for <disk><mirror><source>
  conf: Format seclabels for <backingStore>
  conf: Remove @seclabels from virDomainDiskSourceFormat
  conf: Remove @seclabels from virDomainStorageSourceFormat

 docs/schemas/domaincommon.rng                 |   1 +
 src/conf/domain_conf.c                        | 494 ++++++++++--------
 src/conf/domain_conf.h                        |  32 +-
 src/conf/snapshot_conf.c                      |  40 +-
 src/libvirt_private.syms                      |   4 +-
 src/qemu/qemu_domain.c                        | 104 +---
 src/util/virxml.h                             |   3 +
 tests/qemublocktest.c                         | 179 +++----
 .../blockjob-mirror-in.xml                    |  13 +
 .../qemuxml2argvdata/disk-backing-chains.xml  |   6 +-
 tests/qemuxml2argvdata/disk-mirror.xml        |   8 +-
 .../disk-backing-chains-active.xml            |   6 +-
 .../disk-backing-chains-inactive.xml          |   6 +-
 .../qemuxml2xmloutdata/disk-mirror-active.xml |   8 +-
 tests/virstoragetest.c                        |   2 +-
 15 files changed, 443 insertions(+), 463 deletions(-)

-- 
2.20.1

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