[PATCH 4/5] migration: Drop explicit block activation in postcopy fail path

Peter Xu posted 5 patches 2 days, 11 hours ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Mark Kanda <mark.kanda@oracle.com>, Ben Chaney <bchaney@akamai.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
[PATCH 4/5] migration: Drop explicit block activation in postcopy fail path
Posted by Peter Xu 2 days, 11 hours ago
Postcopy (in failure path) should share with precopy on disk reactivations.
Explicit activiation should used to be fine even if called twice, but after
26f65c01ed ("migration: Do not try to start VM if disk activation fails")
we may want to avoid it and always capture failure when reactivation
happens (even if we do not expect the failure to happen).  Remove this
redundant call.

Signed-off-by: Peter Xu <peterx@redhat.com>
---
 migration/migration.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/migration/migration.c b/migration/migration.c
index 1d9a2fc068..5bef14ea99 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -2910,7 +2910,6 @@ fail:
     if (ms->state != MIGRATION_STATUS_CANCELLING) {
         migrate_set_state(&ms->state, ms->state, MIGRATION_STATUS_FAILED);
     }
-    migration_block_activate(NULL);
     bql_unlock();
     return -1;
 }
-- 
2.50.1
Re: [PATCH 4/5] migration: Drop explicit block activation in postcopy fail path
Posted by Fabiano Rosas 1 day, 21 hours ago
Peter Xu <peterx@redhat.com> writes:

> Postcopy (in failure path) should share with precopy on disk reactivations.
> Explicit activiation should used to be fine even if called twice, but after
> 26f65c01ed ("migration: Do not try to start VM if disk activation fails")
> we may want to avoid it and always capture failure when reactivation
> happens (even if we do not expect the failure to happen).  Remove this
> redundant call.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  migration/migration.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index 1d9a2fc068..5bef14ea99 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -2910,7 +2910,6 @@ fail:
>      if (ms->state != MIGRATION_STATUS_CANCELLING) {
>          migrate_set_state(&ms->state, ms->state, MIGRATION_STATUS_FAILED);
>      }
> -    migration_block_activate(NULL);
>      bql_unlock();
>      return -1;
>  }

Reviewed-by: Fabiano Rosas <farosas@suse.de>