diff options
author | Fiona Ebner <f.ebner@proxmox.com> | 2024-07-11 14:09:15 +0200 |
---|---|---|
committer | Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> | 2024-09-30 10:53:08 +0300 |
commit | 6252deb244b2d60d03545c17eec548a43eb3aefa (patch) | |
tree | 26516077c9dc0021034936bd75ab9ff397d2e42c /blockdev.c | |
parent | 9484ad6c17a735284d4ff75ed3140ded9e0065fd (diff) | |
download | qemu-6252deb244b2d60d03545c17eec548a43eb3aefa.zip qemu-6252deb244b2d60d03545c17eec548a43eb3aefa.tar.gz qemu-6252deb244b2d60d03545c17eec548a43eb3aefa.tar.bz2 |
backup: add minimum cluster size to performance options
In the context of backup fleecing, discarding the source will not work
when the fleecing image has a larger granularity than the one used for
block-copy operations (can happen if the backup target has smaller
cluster size), because cbw_co_pdiscard_snapshot() will align down the
discard requests and thus effectively ignore then.
To make @discard-source work in such a scenario, allow specifying the
minimum cluster size used for block-copy operations and thus in
particular also the granularity for discard requests to the source.
Suggested-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Acked-by: Markus Armbruster <armbru@redhat.com> (QAPI schema)
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-Id: <20240711120915.310243-3-f.ebner@proxmox.com>
[vsementsov: switch version to 9.2 in QAPI doc]
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2655,6 +2655,9 @@ static BlockJob *do_backup_common(BackupCommon *backup, if (backup->x_perf->has_max_chunk) { perf.max_chunk = backup->x_perf->max_chunk; } + if (backup->x_perf->has_min_cluster_size) { + perf.min_cluster_size = backup->x_perf->min_cluster_size; + } } if ((backup->sync == MIRROR_SYNC_MODE_BITMAP) || |