From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFng0-0000Wo-TV for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFnfz-0001Nw-Pz for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:56:24 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:53983) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFnfz-0001Nq-Ko for qemu-devel@nongnu.org; Mon, 17 Oct 2011 09:56:23 -0400 Received: by gyg10 with SMTP id 10so3733356gyg.4 for ; Mon, 17 Oct 2011 06:56:22 -0700 (PDT) Message-ID: <4E9C3404.1020004@codemonkey.ws> Date: Mon, 17 Oct 2011 08:56:20 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1761964d57e56e8d29280b62315de665865299d6.1318326683.git.quintela@redhat.com> In-Reply-To: <1761964d57e56e8d29280b62315de665865299d6.1318326683.git.quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/36] migration: If there is one error, it makes no sense to continue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On 10/11/2011 05:00 AM, Juan Quintela wrote: > Signed-off-by: Juan Quintela The original intention of returning zero was to force a quick finish of the migration. I think this code makes things more brittle because now if you're not doing error checking in the throttling path, you'll just pause the migration forever instead of fast forwarding to a point where you're actually checking for errors. Regards, Anthony Liguori > --- > buffered_file.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/buffered_file.c b/buffered_file.c > index 486af57..bcdf04f 100644 > --- a/buffered_file.c > +++ b/buffered_file.c > @@ -193,9 +193,9 @@ static int buffered_rate_limit(void *opaque) > { > QEMUFileBuffered *s = opaque; > > - if (s->has_error) > - return 0; > - > + if (s->has_error) { > + return 1; > + } > if (s->freeze_output) > return 1; >