[libvirt] [PATCH v2 00/11] qemu: Fix <shareable/> disks for new qemu

Peter Krempa posted 11 patches 6 years, 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1511348086.git.pkrempa@redhat.com
src/qemu/qemu_block.c                              |  15 ++
src/qemu/qemu_block.h                              |   3 +
src/qemu/qemu_capabilities.c                       |   5 +
src/qemu/qemu_capabilities.h                       |   1 +
src/qemu/qemu_command.c                            |   4 +
src/qemu/qemu_domain.c                             | 299 +++++++++++++--------
src/qemu/qemu_driver.c                             | 121 +++++----
.../caps_2.10.0-gicv2.aarch64.xml                  |   1 +
.../caps_2.10.0-gicv3.aarch64.xml                  |   1 +
tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |   1 +
tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |   1 +
tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |   1 +
tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml    |   1 +
tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml    |   1 +
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |   1 +
.../qemuxml2argv-disk-drive-shared-locking.args    |  32 +++
.../qemuxml2argv-disk-drive-shared-locking.xml     |  42 +++
.../qemuxml2argv-disk-drive-shared-qcow.xml        |  28 ++
.../qemuxml2argv-disk-drive-shared.args            |   2 +-
.../qemuxml2argv-disk-drive-shared.xml             |   2 +-
tests/qemuxml2argvtest.c                           |   3 +
21 files changed, 401 insertions(+), 164 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-locking.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-locking.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-qcow.xml
[libvirt] [PATCH v2 00/11] qemu: Fix <shareable/> disks for new qemu
Posted by Peter Krempa 6 years, 4 months ago
Introduction of the disk image locking in qemu created a regression
where disk shared access with <shareable/> would not work.

Since the disk locking is a desired feature, allow libvirt to configure
qemu in such way that <shareable/> disks are exempt from write locks.

First few patches refactor some stuff so that it's less ugly.

This series also mandates that sharing is used only with 'raw' disks
since other formats could corrupt metadata.

v2:
- better capability detection (all the drive types)
- fixed bug when share-rw would be used only with virtio disks
- improved error message with automatic format probing
- rebased to current master (new capability)
- added BZ links into few cover letters

Peter Krempa (11):
  qemu: Move snapshot disk validation functions into one
  qemu: domain: Despaghetify qemuDomainDeviceDefValidate
  qemu: domain: Move hostdev validation into separate function
  qemu: domain: Move video device validation into separate function
  qemu: domain: Refactor domain device validation function
  qemu: block: Add function to check if storage source allows concurrent
    access
  qemu: domain: Reject shared disk access if backing format does not
    support it
  qemu: snapshot: Disallow snapshot of unsupported shared disks
  qemu: Disallow pivot of shared disks to unsupported storage
  qemu: caps: Add capability for 'share-rw' disk option
  qemu: command: Mark <shared/> disks as such in qemu

 src/qemu/qemu_block.c                              |  15 ++
 src/qemu/qemu_block.h                              |   3 +
 src/qemu/qemu_capabilities.c                       |   5 +
 src/qemu/qemu_capabilities.h                       |   1 +
 src/qemu/qemu_command.c                            |   4 +
 src/qemu/qemu_domain.c                             | 299 +++++++++++++--------
 src/qemu/qemu_driver.c                             | 121 +++++----
 .../caps_2.10.0-gicv2.aarch64.xml                  |   1 +
 .../caps_2.10.0-gicv3.aarch64.xml                  |   1 +
 tests/qemucapabilitiesdata/caps_2.10.0.ppc64.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.10.0.s390x.xml   |   1 +
 tests/qemucapabilitiesdata/caps_2.10.0.x86_64.xml  |   1 +
 tests/qemucapabilitiesdata/caps_2.9.0.ppc64.xml    |   1 +
 tests/qemucapabilitiesdata/caps_2.9.0.s390x.xml    |   1 +
 tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml   |   1 +
 .../qemuxml2argv-disk-drive-shared-locking.args    |  32 +++
 .../qemuxml2argv-disk-drive-shared-locking.xml     |  42 +++
 .../qemuxml2argv-disk-drive-shared-qcow.xml        |  28 ++
 .../qemuxml2argv-disk-drive-shared.args            |   2 +-
 .../qemuxml2argv-disk-drive-shared.xml             |   2 +-
 tests/qemuxml2argvtest.c                           |   3 +
 21 files changed, 401 insertions(+), 164 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-locking.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-locking.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-drive-shared-qcow.xml

-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 00/11] qemu: Fix <shareable/> disks for new qemu
Posted by Ján Tomko 6 years, 4 months ago
On Wed, Nov 22, 2017 at 11:56:43AM +0100, Peter Krempa wrote:
>Introduction of the disk image locking in qemu created a regression
>where disk shared access with <shareable/> would not work.
>
>Since the disk locking is a desired feature, allow libvirt to configure
>qemu in such way that <shareable/> disks are exempt from write locks.
>
>First few patches refactor some stuff so that it's less ugly.
>

Thank you.

>This series also mandates that sharing is used only with 'raw' disks
>since other formats could corrupt metadata.
>
>v2:
>- better capability detection (all the drive types)
>- fixed bug when share-rw would be used only with virtio disks
>- improved error message with automatic format probing
>- rebased to current master (new capability)
>- added BZ links into few cover letters
>
>Peter Krempa (11):
>  qemu: Move snapshot disk validation functions into one
>  qemu: domain: Despaghetify qemuDomainDeviceDefValidate
>  qemu: domain: Move hostdev validation into separate function
>  qemu: domain: Move video device validation into separate function
>  qemu: domain: Refactor domain device validation function
>  qemu: block: Add function to check if storage source allows concurrent
>    access
>  qemu: domain: Reject shared disk access if backing format does not
>    support it
>  qemu: snapshot: Disallow snapshot of unsupported shared disks
>  qemu: Disallow pivot of shared disks to unsupported storage
>  qemu: caps: Add capability for 'share-rw' disk option
>  qemu: command: Mark <shared/> disks as such in qemu
>

ACK series

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