From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 4 Nov 2019 14:18:40 +0100 Subject: [PATCH] PVE: backup: consider source cluster size as well Signed-off-by: Wolfgang Bumiller --- block/backup.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/block/backup.c b/block/backup.c index 3e99d23e98..dbdc0a76ca 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;