From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAESC-0001FG-2H for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:37:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAES8-0007p3-1K for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:37:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAES7-0007oE-SA for qemu-devel@nongnu.org; Wed, 01 Jul 2015 05:37:11 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 55D5AB5E8F for ; Wed, 1 Jul 2015 09:37:11 +0000 (UTC) Date: Wed, 1 Jul 2015 10:37:07 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20150701093707.GF2137@work-vm> References: <1435740693-10839-1-git-send-email-quintela@redhat.com> <1435740693-10839-10-git-send-email-quintela@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1435740693-10839-10-git-send-email-quintela@redhat.com> Subject: Re: [Qemu-devel] [PATCH 09/12] migration: Use always helper to set state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: amit.shah@redhat.com, qemu-devel@nongnu.org * Juan Quintela (quintela@redhat.com) wrote: > There were three places that were not using the migrate_set_state() > helper, just fix that. > > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/migration.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/migration/migration.c b/migration/migration.c > index c5b778b..a8d2da5 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -548,7 +548,7 @@ void migrate_fd_error(MigrationState *s) > { > trace_migrate_fd_error(); > assert(s->file == NULL); > - s->state = MIGRATION_STATUS_FAILED; > + migrate_set_state(s, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED); > trace_migrate_set_state(MIGRATION_STATUS_FAILED); > notifier_list_notify(&migration_state_notifiers, s); > } > @@ -633,7 +633,7 @@ static MigrationState *migrate_init(const MigrationParams *params) > s->parameters[MIGRATION_PARAMETER_DECOMPRESS_THREADS] = > decompress_thread_count; > s->bandwidth_limit = bandwidth_limit; > - s->state = MIGRATION_STATUS_SETUP; > + migrate_set_state(s, MIGRATION_STATUS_NONE, MIGRATION_STATUS_SETUP); > trace_migrate_set_state(MIGRATION_STATUS_SETUP); > > s->total_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME); > @@ -732,7 +732,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk, > } else { > error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "uri", > "a valid migration protocol"); > - s->state = MIGRATION_STATUS_FAILED; > + migrate_set_state(s, MIGRATION_STATUS_SETUP, MIGRATION_STATUS_FAILED); > return; > } > > -- > 2.4.3 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK