Patchwork [07/30] migration: make writes blocking

login
register
mail settings
Submitter Paolo Bonzini
Date Nov. 12, 2012, 11:52 a.m.
Message ID <50A0E304.6020409@redhat.com>
Download mbox | patch
Permalink /patch/198376/
State New
Headers show

Comments

Paolo Bonzini - Nov. 12, 2012, 11:52 a.m.
Il 18/10/2012 09:30, Juan Quintela ha scritto:
> @@ -247,10 +247,6 @@ static int migrate_fd_cleanup(MigrationState *s)
>  {
>      int ret = 0;
> 
> -    if (s->fd != -1) {
> -        qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
> -    }
> -
>      if (s->file) {
>          DPRINTF("closing file\n");
>          ret = qemu_fclose(s->file);

While reviewing this patch, I noticed that migrate_fd_cleanup calls
migrate_fd_close twice.  The first via qemu_fclose's own call to
buffered_close, the second directly.

Perhaps you can include something like



somewhere in the series?

Paolo

Patch

diff --git a/migration.c b/migration.c
--- a/migration.c
+++ b/migration.c
@@ -274,5 +274,5 @@  static int migrate_fd_cleanup(MigrationState *s)
     }

-    migrate_fd_close(s);
+    assert(s->fd == -1);
     return ret;
 }