[Qemu-devel] [PATCH v2 13/13] migration: remove notify in fd_error

Peter Xu posted 13 patches 7 years, 9 months ago
[Qemu-devel] [PATCH v2 13/13] migration: remove notify in fd_error
Posted by Peter Xu 7 years, 9 months ago
It should be called in migrate_fd_cleanup too.

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 fbb41b8887..c671f0a662 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1129,7 +1129,6 @@ void migrate_fd_error(MigrationState *s, const Error *error)
     migrate_set_state(&s->state, MIGRATION_STATUS_SETUP,
                       MIGRATION_STATUS_FAILED);
     migrate_set_error(s, error);
-    notifier_list_notify(&migration_state_notifiers, s);
 }
 
 static void migrate_fd_cancel(MigrationState *s)
-- 
2.14.3


Re: [Qemu-devel] [PATCH v2 13/13] migration: remove notify in fd_error
Posted by Juan Quintela 7 years, 9 months ago
Peter Xu <peterx@redhat.com> wrote:
> It should be called in migrate_fd_cleanup too.

It is *already* called in migrate_fd_cleanup.

I think we should add a comment stating that we _always_ end calling
migrate_fd_cleanup, independently of how the migration ends.


> Signed-off-by: Peter Xu <peterx@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

I can also fix the comment when pulling if you agree with the change.

Later, Juan.

Re: [Qemu-devel] [PATCH v2 13/13] migration: remove notify in fd_error
Posted by Peter Xu 7 years, 9 months ago
On Wed, Jan 03, 2018 at 01:31:01PM +0100, Juan Quintela wrote:
> Peter Xu <peterx@redhat.com> wrote:
> > It should be called in migrate_fd_cleanup too.
> 
> It is *already* called in migrate_fd_cleanup.
> 
> I think we should add a comment stating that we _always_ end calling
> migrate_fd_cleanup, independently of how the migration ends.
> 
> 
> > Signed-off-by: Peter Xu <peterx@redhat.com>
> 
> Reviewed-by: Juan Quintela <quintela@redhat.com>
> 
> I can also fix the comment when pulling if you agree with the change.

Yes.  Please modify according to your suggestions (including the other
patch comment).  Thanks for that!

-- 
Peter Xu