Hello everyone! With help of Peter's review and after researching Cole's patches I've come up with the second version. Changes since last revision: - properly taken in account (while probing disk chain) usecase when we have data-file as part of some backing image - added proper integration with security drivers instead of call to chown - data-file is added to qemu cmdline as a reference to blockdev - added XML formatiing and parsing - added basic tests to qemublocktest Nikolai Barybin (13): conf: add data-file feature and related fields to virStorageSource storage file: add getDataFile function to FileTypeInfo storage file: add qcow2 data-file path parsing from header storage file: fill in src->dataFileStore during file probe security: DAC: handle qcow2 data-file on image label set/restore security: selinux: handle qcow2 data-file on image label set/restore security: apparmor: handle qcow2 data-file qemu: put data-file path to VM's cgroup and namespace qemu: factor out qemuDomainPrepareStorageSource() qemu: enable basic qcow2 data-file feature support conf: schemas: add data-file store to domain rng schema conf: implement XML parsing/formatingo for dataFileStore tests: add qcow2 data-file basic tests to qemublocktest src/conf/domain_conf.c | 98 +++++++++++++++++++ src/conf/domain_conf.h | 13 +++ src/conf/schemas/domaincommon.rng | 15 +++ src/conf/storage_source_conf.c | 11 +++ src/conf/storage_source_conf.h | 5 + src/qemu/qemu_block.c | 7 ++ src/qemu/qemu_cgroup.c | 4 + src/qemu/qemu_command.c | 5 + src/qemu/qemu_domain.c | 50 +++++++--- src/qemu/qemu_namespace.c | 5 + src/security/security_dac.c | 26 ++++- src/security/security_selinux.c | 20 +++- src/security/virt-aa-helper.c | 4 + src/storage_file/storage_file_probe.c | 85 ++++++++++++---- src/storage_file/storage_source.c | 28 ++++++ src/storage_file/storage_source.h | 3 + tests/qemublocktest.c | 78 +++++++++------ ...backing-with-data-file-noopts-srconly.json | 27 +++++ ...e-qcow2-backing-with-data-file-noopts.json | 41 ++++++++ ...le-qcow2-backing-with-data-file-noopts.xml | 35 +++++++ .../file-qcow2-data-file-noopts-srconly.json | 18 ++++ .../xml2json/file-qcow2-data-file-noopts.json | 27 +++++ .../xml2json/file-qcow2-data-file-noopts.xml | 24 +++++ 23 files changed, 558 insertions(+), 71 deletions(-) create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-with-data-file-noopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-with-data-file-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-backing-with-data-file-noopts.xml create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-data-file-noopts-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-data-file-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/file-qcow2-data-file-noopts.xml -- 2.43.5