From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38382) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXsZJ-0005Ot-Ak for qemu-devel@nongnu.org; Mon, 12 Nov 2012 06:52:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TXsZG-0001u2-7F for qemu-devel@nongnu.org; Mon, 12 Nov 2012 06:52:45 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:60097) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TXsZG-0001to-16 for qemu-devel@nongnu.org; Mon, 12 Nov 2012 06:52:42 -0500 Received: by mail-pa0-f45.google.com with SMTP id fb10so4128375pad.4 for ; Mon, 12 Nov 2012 03:52:41 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50A0E304.6020409@redhat.com> Date: Mon, 12 Nov 2012 12:52:36 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1350545426-23172-1-git-send-email-quintela@redhat.com> <1350545426-23172-8-git-send-email-quintela@redhat.com> In-Reply-To: <1350545426-23172-8-git-send-email-quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 07/30] migration: make writes blocking List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org 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 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; } somewhere in the series? Paolo