mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qapi: backup: add max-chunk and max-workers to x-perf struct
Add new parameters to configure future backup features. The patch doesn't introduce aio backup requests (so we actually have only one worker) neither requests larger than one cluster. Still, formally we satisfy these maximums anyway, so add the parameters now, to facilitate further patch which will really change backup job behavior. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210116214705.822267-11-vsementsov@virtuozzo.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
parent
3ee1483b95
commit
2c59fd833a
4 changed files with 43 additions and 8 deletions
|
@ -2829,7 +2829,7 @@ static BlockJob *do_backup_common(BackupCommon *backup,
|
|||
{
|
||||
BlockJob *job = NULL;
|
||||
BdrvDirtyBitmap *bmap = NULL;
|
||||
BackupPerf perf = { .use_copy_range = true };
|
||||
BackupPerf perf = { .use_copy_range = true, .max_workers = 64 };
|
||||
int job_flags = JOB_DEFAULT;
|
||||
|
||||
if (!backup->has_speed) {
|
||||
|
@ -2858,6 +2858,12 @@ static BlockJob *do_backup_common(BackupCommon *backup,
|
|||
if (backup->x_perf->has_use_copy_range) {
|
||||
perf.use_copy_range = backup->x_perf->use_copy_range;
|
||||
}
|
||||
if (backup->x_perf->has_max_workers) {
|
||||
perf.max_workers = backup->x_perf->max_workers;
|
||||
}
|
||||
if (backup->x_perf->has_max_chunk) {
|
||||
perf.max_chunk = backup->x_perf->max_chunk;
|
||||
}
|
||||
}
|
||||
|
||||
if ((backup->sync == MIRROR_SYNC_MODE_BITMAP) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue