[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 6/7] migration: allow cancel to unpause
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v3 6/7] migration: allow cancel to unpause |
Date: |
Thu, 19 Oct 2017 12:44:32 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Wed, Oct 18, 2017 at 06:40:12PM +0100, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> If a migration_cancel is issued during the new paused state,
> kick the pause_sem to get to unpause so it can cancel.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
> ---
> migration/migration.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/migration/migration.c b/migration/migration.c
> index c9a3ee9efd..756deb3e2c 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -1108,6 +1108,10 @@ static void migrate_fd_cancel(MigrationState *s)
> if (!migration_is_setup_or_active(old_state)) {
> break;
> }
> + /* If the migration is paused, kick it out of the pause */
> + if (old_state == MIGRATION_STATUS_PRE_SWITCHOVER) {
> + qemu_sem_post(&s->pause_sem);
> + }
> migrate_set_state(&s->state, old_state, MIGRATION_STATUS_CANCELLING);
> } while (s->state != MIGRATION_STATUS_CANCELLING);
>
> --
> 2.13.6
>
--
Peter Xu
- Re: [Qemu-devel] [PATCH v3 2/7] migration: Add 'pre-switchover' and 'device' statuses, (continued)
- [Qemu-devel] [PATCH v3 3/7] migration: Wait for semaphore before completing migration, Dr. David Alan Gilbert (git), 2017/10/18
- [Qemu-devel] [PATCH v3 4/7] migration: migrate-continue, Dr. David Alan Gilbert (git), 2017/10/18
- [Qemu-devel] [PATCH v3 5/7] migrate: HMP migate_continue, Dr. David Alan Gilbert (git), 2017/10/18
- [Qemu-devel] [PATCH v3 6/7] migration: allow cancel to unpause, Dr. David Alan Gilbert (git), 2017/10/18
- Re: [Qemu-devel] [PATCH v3 6/7] migration: allow cancel to unpause,
Peter Xu <=
- [Qemu-devel] [PATCH v3 7/7] migration: pause-before-switchover for postcopy, Dr. David Alan Gilbert (git), 2017/10/18
- Re: [Qemu-devel] [PATCH v3 0/7] migration: pause-before-switchover, Peter Xu, 2017/10/19
- Re: [Qemu-devel] [PATCH v3 0/7] migration: pause-before-switchover, Jiri Denemark, 2017/10/19