Skip to content

Commit

Permalink
migration: allow enabling mutilfd for specific protocol only
Browse files Browse the repository at this point in the history
To: <quintela@redhat.com>, <dgilbert@redhat.com>, <qemu-devel@nongnu.org>
CC: Li Zhijian <lizhijian@cn.fujitsu.com>
Date: Sat, 31 Jul 2021 22:05:52 +0800 (5 weeks, 4 days, 17 hours ago)

And change the default to true so that in '-incoming defer' case, user is able
to change multifd capability.

Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
zhijianli88 authored and Juan Quintela committed Sep 9, 2021
1 parent 9ff82a9 commit 158cced
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions migration/migration.c
Expand Up @@ -1237,6 +1237,14 @@ static bool migrate_caps_check(bool *cap_list,
}
}

/* incoming side only */
if (runstate_check(RUN_STATE_INMIGRATE) &&
!migrate_multifd_is_allowed() &&
cap_list[MIGRATION_CAPABILITY_MULTIFD]) {
error_setg(errp, "multifd is not supported by current protocol");
return false;
}

return true;
}

Expand Down
2 changes: 1 addition & 1 deletion migration/multifd.c
Expand Up @@ -868,7 +868,7 @@ static void multifd_new_send_channel_async(QIOTask *task, gpointer opaque)
multifd_new_send_channel_cleanup(p, sioc, local_err);
}

static bool migrate_allow_multifd;
static bool migrate_allow_multifd = true;
void migrate_protocol_allow_multifd(bool allow)
{
migrate_allow_multifd = allow;
Expand Down

0 comments on commit 158cced

Please sign in to comment.