Skip to content

Commit

Permalink
migration/multifd: Drop pages->num check in sender thread
Browse files Browse the repository at this point in the history
Now with a split SYNC handler, we always have pages->num set for
pending_job==true.  Assert it instead.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240202102857.110210-9-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
  • Loading branch information
xzpeter committed Feb 5, 2024
1 parent e3cce9a commit 83c560f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions migration/multifd.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,13 +710,14 @@ static void *multifd_send_thread(void *opaque)
p->iovs_num = 1;
}

if (pages->num) {
ret = multifd_send_state->ops->send_prepare(p, &local_err);
if (ret != 0) {
qemu_mutex_unlock(&p->mutex);
break;
}
assert(pages->num);

ret = multifd_send_state->ops->send_prepare(p, &local_err);
if (ret != 0) {
qemu_mutex_unlock(&p->mutex);
break;
}

multifd_send_fill_packet(p);
p->num_packets++;
p->total_normal_pages += pages->num;
Expand Down

0 comments on commit 83c560f

Please sign in to comment.