917265984c
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
29 lines
952 B
Diff
29 lines
952 B
Diff
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 c682c99f7a..556367f8ba 100644
|
|
--- a/block/backup.c
|
|
+++ b/block/backup.c
|
|
@@ -642,11 +642,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;
|