fix backup speed regression

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-11-04 14:23:17 +01:00
parent 82d7827472
commit d4824fa37a
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,28 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
Date: Mon, 4 Nov 2019 14:18:40 +0100
Subject: [PATCH] PVE: backup: consider source cluster size as well
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
block/backup.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/backup.c b/block/backup.c
index cc20d77b9f..cdf815816f 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -655,11 +655,8 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
goto error;
}
- if (target) {
- cluster_size = backup_calculate_cluster_size(target, errp);
- } else {
- cluster_size = dump_cb_block_size;
- }
+ cluster_size = backup_calculate_cluster_size(target ? target : bs, errp);
+ cluster_size = MAX(cluster_size, dump_cb_block_size);
if (cluster_size < 0) {
goto error;

View File

@ -39,3 +39,4 @@ pve/0037-rename-config_to_vma-into-pvebackup_co_add_config.patch
pve/0038-pvebackup_co_dump_cb-do-not-call-job-cancel.patch
pve/0039-fix-backup-job-completion.patch
pve/0040-pvebackup_complete_cb-avoid-poll-loop-if-already-ins.patch
pve/0041-PVE-backup-consider-source-cluster-size-as-well.patch