26.10.2020 20: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 <vsement...@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/qapi/block-core.json b/qapi/block-core.json
index 71e6faa15c..5a21c24c1d 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1378,10 +1378,19 @@
  #
  # @use-copy-range: Use copy offloading. Default true.
  #
+# @max-workers: Maximum number of parallel requests for the sustained 
background
+#               copying process. Doesn't influence copy-before-write 
operations.
+#               Default 64.
+#
+# @max-chunk: Maximum request length for the sustained background copying
+#             process. Doesn't influence copy-before-write operations.
+#             0 means unlimited. Default 0.
+#
  # Since: 5.2
  ##
  { 'struct': 'BackupPerf',
-  'data': { '*use-copy-range': 'bool' }}
+  'data': { '*use-copy-range': 'bool',
+            '*max-workers': 'int', '*max-chunk': 'int64' } }
##
  # @BackupCommon:

squash-in:

diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5591189b75..276ad5e6a8 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1406,7 +1406,9 @@
 #
 # @max-chunk: Maximum request length for the sustained background copying
 #             process. Doesn't influence copy-before-write operations.
-#             0 means unlimited. Default 0.
+#             0 means unlimited. If max-chunk is non-zero then it should not be
+#             less than job cluster size which is calculated as maximum of
+#             target image cluster size and 64k. Default 0.
 #
 # Since: 5.2
 ##


--
Best regards,
Vladimir

Reply via email to