qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 11/25] qapi: backup: add max-chunk and max-workers to x-pe


From: Max Reitz
Subject: Re: [PATCH v3 11/25] qapi: backup: add max-chunk and max-workers to x-perf struct
Date: Tue, 12 Jan 2021 12:59:41 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 26.10.20 18:18, Vladimir Sementsov-Ogievskiy wrote:
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>
---
  qapi/block-core.json | 11 ++++++++++-
  block/backup.c       | 28 +++++++++++++++++++++++-----
  block/replication.c  |  2 +-
  blockdev.c           |  8 +++++++-
  4 files changed, 41 insertions(+), 8 deletions(-)

[...]

diff --git a/block/backup.c b/block/backup.c
index 09ff5a92ef..8c67d77504 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -388,6 +388,29 @@ BlockJob *backup_job_create(const char *job_id, 
BlockDriverState *bs,
          return NULL;
      }
+ cluster_size = backup_calculate_cluster_size(target, errp);
+    if (cluster_size < 0) {
+        goto error;
+    }
+
+    if (perf->max_workers < 1) {
+        error_setg(errp, "max-worker must be greater than zero");

*max-workers

With that fixed:

Reviewed-by: Max Reitz <mreitz@redhat.com>

+        return NULL;
+    }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]