[PATCH 0/5] qemu: Introduce control of qcow2 metadata cache maximum size

Peter Krempa posted 5 patches 3 years, 3 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1610031539.git.pkrempa@redhat.com
docs/formatdomain.rst                         | 43 ++++++++++
docs/formatsnapshot.html.in                   |  4 +
docs/schemas/domaincommon.rng                 | 20 ++++-
docs/schemas/domainsnapshot.rng               | 10 ++-
src/conf/domain_conf.c                        | 81 ++++++++++++++-----
src/conf/snapshot_conf.c                      | 50 ++++++++----
src/qemu/qemu_block.c                         | 11 +++
src/qemu/qemu_domain.c                        | 15 ++++
src/qemu/qemu_snapshot.c                      | 14 ++++
src/util/virstoragefile.c                     |  1 +
src/util/virstoragefile.h                     |  2 +
.../qcow2-metadata-cache.xml                  | 14 ++++
.../qcow2-metadata-cache.xml                  | 18 +++++
tests/qemudomainsnapshotxml2xmltest.c         |  3 +
.../disk-metadata-cache.x86_64-latest.args    | 57 +++++++++++++
.../qemuxml2argvdata/disk-metadata-cache.xml  | 46 +++++++++++
tests/qemuxml2argvtest.c                      |  1 +
.../disk-metadata-cache.x86_64-latest.xml     | 58 +++++++++++++
tests/qemuxml2xmltest.c                       |  1 +
19 files changed, 411 insertions(+), 38 deletions(-)
create mode 100644 tests/qemudomainsnapshotxml2xmlin/qcow2-metadata-cache.xml
create mode 100644 tests/qemudomainsnapshotxml2xmlout/qcow2-metadata-cache.xml
create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.xml
create mode 100644 tests/qemuxml2xmloutdata/disk-metadata-cache.x86_64-latest.xml
[PATCH 0/5] qemu: Introduce control of qcow2 metadata cache maximum size
Posted by Peter Krempa 3 years, 3 months ago
See patch 3/5 for explanation.

Peter Krempa (5):
  virDomainDiskDefFormatDriver: Rename 'driverBuf' to 'attrBuf'
  virDomainSnapshotDiskDefFormat: Use virXMLFormatElement
  conf: Introduce <metadata_cache> subelement of <disk><driver>
  conf: snapshot: Add support for <metadata_cache>
  qemu: Implement '<metadata_cache><max_size>' control for qcow2

 docs/formatdomain.rst                         | 43 ++++++++++
 docs/formatsnapshot.html.in                   |  4 +
 docs/schemas/domaincommon.rng                 | 20 ++++-
 docs/schemas/domainsnapshot.rng               | 10 ++-
 src/conf/domain_conf.c                        | 81 ++++++++++++++-----
 src/conf/snapshot_conf.c                      | 50 ++++++++----
 src/qemu/qemu_block.c                         | 11 +++
 src/qemu/qemu_domain.c                        | 15 ++++
 src/qemu/qemu_snapshot.c                      | 14 ++++
 src/util/virstoragefile.c                     |  1 +
 src/util/virstoragefile.h                     |  2 +
 .../qcow2-metadata-cache.xml                  | 14 ++++
 .../qcow2-metadata-cache.xml                  | 18 +++++
 tests/qemudomainsnapshotxml2xmltest.c         |  3 +
 .../disk-metadata-cache.x86_64-latest.args    | 57 +++++++++++++
 .../qemuxml2argvdata/disk-metadata-cache.xml  | 46 +++++++++++
 tests/qemuxml2argvtest.c                      |  1 +
 .../disk-metadata-cache.x86_64-latest.xml     | 58 +++++++++++++
 tests/qemuxml2xmltest.c                       |  1 +
 19 files changed, 411 insertions(+), 38 deletions(-)
 create mode 100644 tests/qemudomainsnapshotxml2xmlin/qcow2-metadata-cache.xml
 create mode 100644 tests/qemudomainsnapshotxml2xmlout/qcow2-metadata-cache.xml
 create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.x86_64-latest.args
 create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.xml
 create mode 100644 tests/qemuxml2xmloutdata/disk-metadata-cache.x86_64-latest.xml

-- 
2.29.2

Re: [PATCH 0/5] qemu: Introduce control of qcow2 metadata cache maximum size
Posted by Ján Tomko 3 years, 3 months ago
On a Thursday in 2021, Peter Krempa wrote:
>See patch 3/5 for explanation.
>
>Peter Krempa (5):
>  virDomainDiskDefFormatDriver: Rename 'driverBuf' to 'attrBuf'
>  virDomainSnapshotDiskDefFormat: Use virXMLFormatElement
>  conf: Introduce <metadata_cache> subelement of <disk><driver>
>  conf: snapshot: Add support for <metadata_cache>
>  qemu: Implement '<metadata_cache><max_size>' control for qcow2
>
> docs/formatdomain.rst                         | 43 ++++++++++
> docs/formatsnapshot.html.in                   |  4 +
> docs/schemas/domaincommon.rng                 | 20 ++++-
> docs/schemas/domainsnapshot.rng               | 10 ++-
> src/conf/domain_conf.c                        | 81 ++++++++++++++-----
> src/conf/snapshot_conf.c                      | 50 ++++++++----
> src/qemu/qemu_block.c                         | 11 +++
> src/qemu/qemu_domain.c                        | 15 ++++
> src/qemu/qemu_snapshot.c                      | 14 ++++
> src/util/virstoragefile.c                     |  1 +
> src/util/virstoragefile.h                     |  2 +
> .../qcow2-metadata-cache.xml                  | 14 ++++
> .../qcow2-metadata-cache.xml                  | 18 +++++
> tests/qemudomainsnapshotxml2xmltest.c         |  3 +
> .../disk-metadata-cache.x86_64-latest.args    | 57 +++++++++++++
> .../qemuxml2argvdata/disk-metadata-cache.xml  | 46 +++++++++++
> tests/qemuxml2argvtest.c                      |  1 +
> .../disk-metadata-cache.x86_64-latest.xml     | 58 +++++++++++++
> tests/qemuxml2xmltest.c                       |  1 +
> 19 files changed, 411 insertions(+), 38 deletions(-)
> create mode 100644 tests/qemudomainsnapshotxml2xmlin/qcow2-metadata-cache.xml
> create mode 100644 tests/qemudomainsnapshotxml2xmlout/qcow2-metadata-cache.xml
> create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.x86_64-latest.args
> create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.xml
> create mode 100644 tests/qemuxml2xmloutdata/disk-metadata-cache.x86_64-latest.xml
>

Okay, so IIUC the difference to the previous attempts [0] is that this
series that were rejected is, that this only uses 'cache-size' instead
of the finer options. Fine by me:

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano


[0]
   [libvirt] [PATCH v6 0/2] Add support for qcow2 cache by Liu Qing:
   https://www.redhat.com/archives/libvir-list/2017-September/msg00553.html

   [libvirt] [RFC] add option to configure qcow2 cache sizes in domain xml
   https://www.redhat.com/archives/libvir-list/2018-April/msg00773.html

Re: [PATCH 0/5] qemu: Introduce control of qcow2 metadata cache maximum size
Posted by Peter Krempa 3 years, 3 months ago
On Thu, Jan 07, 2021 at 22:11:42 +0100, Ján Tomko wrote:
> On a Thursday in 2021, Peter Krempa wrote:
> > See patch 3/5 for explanation.
> > 
> > Peter Krempa (5):
> >  virDomainDiskDefFormatDriver: Rename 'driverBuf' to 'attrBuf'
> >  virDomainSnapshotDiskDefFormat: Use virXMLFormatElement
> >  conf: Introduce <metadata_cache> subelement of <disk><driver>
> >  conf: snapshot: Add support for <metadata_cache>
> >  qemu: Implement '<metadata_cache><max_size>' control for qcow2
> > 
> > docs/formatdomain.rst                         | 43 ++++++++++
> > docs/formatsnapshot.html.in                   |  4 +
> > docs/schemas/domaincommon.rng                 | 20 ++++-
> > docs/schemas/domainsnapshot.rng               | 10 ++-
> > src/conf/domain_conf.c                        | 81 ++++++++++++++-----
> > src/conf/snapshot_conf.c                      | 50 ++++++++----
> > src/qemu/qemu_block.c                         | 11 +++
> > src/qemu/qemu_domain.c                        | 15 ++++
> > src/qemu/qemu_snapshot.c                      | 14 ++++
> > src/util/virstoragefile.c                     |  1 +
> > src/util/virstoragefile.h                     |  2 +
> > .../qcow2-metadata-cache.xml                  | 14 ++++
> > .../qcow2-metadata-cache.xml                  | 18 +++++
> > tests/qemudomainsnapshotxml2xmltest.c         |  3 +
> > .../disk-metadata-cache.x86_64-latest.args    | 57 +++++++++++++
> > .../qemuxml2argvdata/disk-metadata-cache.xml  | 46 +++++++++++
> > tests/qemuxml2argvtest.c                      |  1 +
> > .../disk-metadata-cache.x86_64-latest.xml     | 58 +++++++++++++
> > tests/qemuxml2xmltest.c                       |  1 +
> > 19 files changed, 411 insertions(+), 38 deletions(-)
> > create mode 100644 tests/qemudomainsnapshotxml2xmlin/qcow2-metadata-cache.xml
> > create mode 100644 tests/qemudomainsnapshotxml2xmlout/qcow2-metadata-cache.xml
> > create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.x86_64-latest.args
> > create mode 100644 tests/qemuxml2argvdata/disk-metadata-cache.xml
> > create mode 100644 tests/qemuxml2xmloutdata/disk-metadata-cache.x86_64-latest.xml
> > 
> 
> Okay, so IIUC the difference to the previous attempts [0] is that this
> series that were rejected is, that this only uses 'cache-size' instead

Yes. Specifically, we now declare it as a metadata cache size maximum
size knob. This comes also with a change in qemu which allocates the
cache on-demand.