From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0fuZ-0005hk-8W for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:27:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0fuU-0005fn-HR for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:27:50 -0400 Received: from [199.232.76.173] (port=60580 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0fuU-0005fh-BY for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:27:46 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:52494) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0fuU-000800-19 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 14:27:46 -0400 Received: by fg-out-1718.google.com with SMTP id 16so1598225fgg.10 for ; Wed, 21 Oct 2009 11:27:44 -0700 (PDT) Message-ID: <4ADF529B.8020300@codemonkey.ws> Date: Wed, 21 Oct 2009 13:27:39 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3/3 v4] Enable migration without shared storage from the monitor References: <12553639352145-git-send-email-lirans@il.ibm.com> In-Reply-To: <12553639352145-git-send-email-lirans@il.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: lirans@il.ibm.com Cc: qemu-devel@nongnu.org lirans@il.ibm.com wrote: > This patch adds the option to activate non-shared storage migration from the > monitor. > The migration command is as follows: > (qemu) migrate -d tcp:0:4444 # for ordinary live migration > (qemu) migrate -d -b tcp:0:4444 # for live migration with complete storage copy > (qemu) migrate -d -i tcp:0:4444 # for live migration with incremental storage copy, storage is cow based. > > Signed-off-by: Liran Schour > --- > diff --git a/monitor.c b/monitor.c > index 3424e60..ae29181 100644 > --- a/monitor.c > +++ b/monitor.c > @@ -2907,6 +2907,18 @@ static int default_fmt_size = 4; > > #define MAX_ARGS 16 > > +static int is_valid_option(const char *c, const char *typestr) > +{ > + char option[3]; > + > + option[0] = '-'; > + option[1] = *c; > + option[2] = '\0'; > + > + typestr = strstr(typestr, option); > + return (typestr != NULL); > +} > This is pretty darn funky. Can you explain why this is needed? Regards, Anthony Liguori