This series fixes and improves the 'json:' pseudo-protocol parser and implements the 'offset' and 'size' attributes and exposes them as <slice> in the XML. https://bugzilla.redhat.com/show_bug.cgi?id=1791788 Peter Krempa (15): virStorageSourceParseBackingJSON: Pass around original backing file string virStorageSourceParseBackingJSON: Move deflattening of json: URIs out of recursion virStorageSourceJSONDriverParser: annotate 'format' drivers virStorageSourceParseBackingJSON: Allow 'json:' pseudo URIs without 'file' wrapper virStorageSourceParseBackingJSON: Prevent arbitrary nesting with format drivers tests: virstorage: Add test cases for "json:" pseudo-URI without 'file' wrapper tests: virstorage: Add test data for json specified raw image with offset/size util: virstoragefile: Add data structure for storing storage source slices qemuBlockStorageSourceGetFormatRawProps: format 'offset' and 'size' for slice qemuDomainValidateStorageSource: Reject unsupported slices docs: formatdomain: Close <source> on one of disk examples docs: Document the new <slices> sub-element of disk's <source> conf: Implement support for <slices> of disk source tests: qemu: Add test data for the new <slice> element virStorageSourceParseBackingJSONRaw: Parse 'offset' and 'size' attributes docs/formatdomain.html.in | 12 ++ docs/schemas/domaincommon.rng | 33 ++++ src/conf/domain_conf.c | 92 +++++++++++ src/qemu/qemu_block.c | 12 +- src/qemu/qemu_domain.c | 15 ++ src/util/virstoragefile.c | 156 +++++++++++++----- src/util/virstoragefile.h | 12 ++ .../disk-slices.x86_64-latest.args | 50 ++++++ tests/qemuxml2argvdata/disk-slices.xml | 45 +++++ tests/qemuxml2argvtest.c | 2 + .../disk-slices.x86_64-latest.xml | 56 +++++++ tests/qemuxml2xmltest.c | 2 + tests/virstoragetest.c | 23 +++ 13 files changed, 462 insertions(+), 48 deletions(-) create mode 100644 tests/qemuxml2argvdata/disk-slices.x86_64-latest.args create mode 100644 tests/qemuxml2argvdata/disk-slices.xml create mode 100644 tests/qemuxml2xmloutdata/disk-slices.x86_64-latest.xml -- 2.24.1