|
From: | Vladimir Sementsov-Ogievskiy |
Subject: | Re: [PATCH v4 2/6] block-copy: streamline choice of copy_range vs. read/write |
Date: | Sat, 19 Jun 2021 21:23:51 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |