14.06.2021 10:33, Emanuele Giuseppe Esposito wrote:
@@ -158,8 +183,9 @@ static BlockCopyTask *block_copy_task_create(BlockCopyState 
*s,
                                               int64_t offset, int64_t bytes)
  {
      BlockCopyTask *task;
-    int64_t max_chunk = MIN_NON_ZERO(s->copy_size, call_state->max_chunk);
+    int64_t max_chunk = block_copy_chunk_size(s);
+ max_chunk = MIN_NON_ZERO(max_chunk, call_state->max_chunk);

Note that you modify this code in patch 4. So, you may write here

int64_t max_chunk;

max_chunk = MIN_NON_ZERO(block_copy_chunk_size(s), call_state->max_chunk);

to not modify it later.

--
Best regards,
Vladimir

Reply via email to