aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2024-10-24 17:30:52 -0400
committerPeter Xu <peterx@redhat.com>2024-10-31 15:48:18 -0400
commitf018eb62b2bb7618b0cb8a796ac4b76fd786ecaf (patch)
tree6d93fec9312cea0071a58734b720dd46b22fdbfc /net
parent64dcd2c9c627b88ec7d071e1b49f0180b467fc71 (diff)
migration: Drop migration_is_setup_or_active()
This helper is mostly the same as migration_is_running(), except that one has COLO reported as true, the other has CANCELLING reported as true. Per my past years experience on the state changes, none of them should matter. To make it slightly safer, report both COLO || CANCELLING to be true in migration_is_running(), then drop the other one. We kept the 1st only because the name is simpler, and clear enough. Reviewed-by: Cédric Le Goater <clg@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20241024213056.1395400-5-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/vhost-vdpa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c
index 46b02c50be..231b45246c 100644
--- a/net/vhost-vdpa.c
+++ b/net/vhost-vdpa.c
@@ -375,8 +375,7 @@ static int vhost_vdpa_net_data_start(NetClientState *nc)
assert(nc->info->type == NET_CLIENT_DRIVER_VHOST_VDPA);
- if (s->always_svq ||
- migration_is_setup_or_active()) {
+ if (s->always_svq || migration_is_running()) {
v->shadow_vqs_enabled = true;
} else {
v->shadow_vqs_enabled = false;