qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 1/6] block/block-copy: rename in-flight requests to tasks


From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v2 1/6] block/block-copy: rename in-flight requests to tasks
Date: Tue, 28 Apr 2020 12:18:06 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

28.04.2020 10:30, Max Reitz wrote:
On 25.03.20 14:46, Vladimir Sementsov-Ogievskiy wrote:
We are going to use aio-task-pool API and extend in-flight request
structure to be a successor of AioTask, so rename things appropriately.

Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  block/block-copy.c | 99 +++++++++++++++++++++++-----------------------
  1 file changed, 49 insertions(+), 50 deletions(-)

diff --git a/block/block-copy.c b/block/block-copy.c
index 05227e18bf..61d1d26991 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c

[...]

-static void coroutine_fn block_copy_inflight_req_shrink(BlockCopyState *s,
-        BlockCopyInFlightReq *req, int64_t new_bytes)
+static void coroutine_fn block_copy_task_shrink(BlockCopyState *s,
+                                                BlockCopyTask *task,
+                                                int64_t new_bytes)
  {
-    if (new_bytes == req->bytes) {
+    if (new_bytes == task->bytes) {
          return;
      }
- assert(new_bytes > 0 && new_bytes < req->bytes);
+    assert(new_bytes > 0 && new_bytes < task->bytes);
- s->in_flight_bytes -= req->bytes - new_bytes;
+    s->in_flight_bytes -= task->bytes - new_bytes;
      bdrv_set_dirty_bitmap(s->copy_bitmap,
-                          req->offset + new_bytes, req->bytes - new_bytes);
+                          task->offset + new_bytes, task->bytes - new_bytes);
+    s->in_flight_bytes -= task->bytes - new_bytes;

This line doesn’t seem right.


Hmm yes.. A kind of copy-paste or rebase artifact.


--
Best regards,
Vladimir



reply via email to

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