mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: capabilities: Introduce QEMU_CAPS_QCOW2_DISCARD_NO_UNREF
The qcow2 driver allows passing discards to the storage while keeping the reference of the block, and just marking it as zeroed. This can decrease the levels of fragmentation of the qcow2 metadata when discards are enabled. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
91856be29b
commit
1092a88e13
@ -693,6 +693,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
|
|||||||
"virtio-gpu.blob", /* QEMU_CAPS_VIRTIO_GPU_BLOB */
|
"virtio-gpu.blob", /* QEMU_CAPS_VIRTIO_GPU_BLOB */
|
||||||
"rbd-encryption-layering", /* QEMU_CAPS_RBD_ENCRYPTION_LAYERING */
|
"rbd-encryption-layering", /* QEMU_CAPS_RBD_ENCRYPTION_LAYERING */
|
||||||
"rbd-encryption-luks-any", /* QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY */
|
"rbd-encryption-luks-any", /* QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY */
|
||||||
|
"qcow2-discard-no-unref", /* QEMU_CAPS_QCOW2_DISCARD_NO_UNREF */
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -1536,6 +1537,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSchemaQueries[] = {
|
|||||||
{ "blockdev-add/arg-type/+rbd/encrypt/parent", QEMU_CAPS_RBD_ENCRYPTION_LAYERING },
|
{ "blockdev-add/arg-type/+rbd/encrypt/parent", QEMU_CAPS_RBD_ENCRYPTION_LAYERING },
|
||||||
{ "blockdev-add/arg-type/+rbd/encrypt/format/^luks-any", QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY },
|
{ "blockdev-add/arg-type/+rbd/encrypt/format/^luks-any", QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY },
|
||||||
{ "blockdev-add/arg-type/+nbd/tls-hostname", QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME },
|
{ "blockdev-add/arg-type/+nbd/tls-hostname", QEMU_CAPS_BLOCKDEV_NBD_TLS_HOSTNAME },
|
||||||
|
{ "blockdev-add/arg-type/+qcow2/discard-no-unref", QEMU_CAPS_QCOW2_DISCARD_NO_UNREF },
|
||||||
{ "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
|
{ "blockdev-snapshot/$allow-write-only-overlay", QEMU_CAPS_BLOCKDEV_SNAPSHOT_ALLOW_WRITE_ONLY },
|
||||||
{ "chardev-add/arg-type/backend/+socket/data/reconnect", QEMU_CAPS_CHARDEV_RECONNECT },
|
{ "chardev-add/arg-type/backend/+socket/data/reconnect", QEMU_CAPS_CHARDEV_RECONNECT },
|
||||||
{ "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
|
{ "device_add/$json-cli-hotplug", QEMU_CAPS_DEVICE_JSON },
|
||||||
|
@ -672,6 +672,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
|
|||||||
QEMU_CAPS_VIRTIO_GPU_BLOB, /* -device virtio-gpu-*.blob= */
|
QEMU_CAPS_VIRTIO_GPU_BLOB, /* -device virtio-gpu-*.blob= */
|
||||||
QEMU_CAPS_RBD_ENCRYPTION_LAYERING, /* layered encryption support for Ceph RBD */
|
QEMU_CAPS_RBD_ENCRYPTION_LAYERING, /* layered encryption support for Ceph RBD */
|
||||||
QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY, /* luks-any (LUKS and LUKS2) encryption format for Ceph RBD */
|
QEMU_CAPS_RBD_ENCRYPTION_LUKS_ANY, /* luks-any (LUKS and LUKS2) encryption format for Ceph RBD */
|
||||||
|
QEMU_CAPS_QCOW2_DISCARD_NO_UNREF, /* qcow2 block driver allows discards without unrefing the sector */
|
||||||
|
|
||||||
QEMU_CAPS_LAST /* this must always be the last item */
|
QEMU_CAPS_LAST /* this must always be the last item */
|
||||||
} virQEMUCapsFlags;
|
} virQEMUCapsFlags;
|
||||||
|
@ -206,6 +206,7 @@
|
|||||||
<flag name='virtio-gpu.blob'/>
|
<flag name='virtio-gpu.blob'/>
|
||||||
<flag name='rbd-encryption-layering'/>
|
<flag name='rbd-encryption-layering'/>
|
||||||
<flag name='rbd-encryption-luks-any'/>
|
<flag name='rbd-encryption-luks-any'/>
|
||||||
|
<flag name='qcow2-discard-no-unref'/>
|
||||||
<version>8000050</version>
|
<version>8000050</version>
|
||||||
<microcodeVersion>43100245</microcodeVersion>
|
<microcodeVersion>43100245</microcodeVersion>
|
||||||
<package>v8.0.0-1619-g369081c455</package>
|
<package>v8.0.0-1619-g369081c455</package>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user