From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Lalancette Subject: Re: [PATCH]: Make migration handle errors a little better Date: Thu, 24 Jan 2008 14:22:43 -0500 Message-ID: <4798E583.7090603@redhat.com> References: <4797997A.1050809@redhat.com> <47987021.6010203@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Uri Lublin Return-path: In-Reply-To: <47987021.6010203-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Uri Lublin wrote: > > Chris Lalancette wrote: >> All, >> Attached is a fairly simple patch to the migration code to make it handle >> errors better. In particular, if the remote side wasn't set up properly (i.e. >> the memory size didn't match), the migration would fail, but the source host >> didn't actually react properly, so the migration would still be "in-progress". >> This patch fixes up the error checking to properly quit when the remote side >> isn't prepared for whatever reason. >> >> Signed-off-by: Chris Lalancette >> > Patch looks good. > Why did you define MIG_STAT_DIRTY_TRACK_FAIL and not > MIG_STAT_KVM_SET_DIRTY_TRACKING_FAILED ? Heh. I was just being lazy, and I didn't want to type all of that :). I can change it to be more correct, though. > Also we need to make sure, in case of a failure, that 'status' is > updated and *s->has_error is freed. How about calling migrate_finish ? Oh, good point. I thought calling migrate_close() would be enough, but it looks like you are right, we also need to free up has_error. I'll send an updated patch. Thanks for the review! Chris Lalancette ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/