From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53249) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCxHW-0000JY-D9 for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:16:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCxHQ-0002k3-4G for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:16:42 -0500 Received: from cantor2.suse.de ([195.135.220.15]:48940 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCxHP-0002jt-UG for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:16:36 -0500 Message-ID: <52F9339E.6070100@suse.de> Date: Mon, 10 Feb 2014 21:16:30 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <20140127194611.679775b92d4be424325b6ecf@nii.ac.jp> In-Reply-To: <20140127194611.679775b92d4be424325b6ecf@nii.ac.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] Human Monitor: migrate command (without -d) now blocks correctly List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Soramichi AKIYAMA , qemu-devel@nongnu.org Cc: lcapitulino@redhat.com Hi Soramichi-san, Am 27.01.2014 11:46, schrieb Soramichi AKIYAMA: > This patch fixes a timing issue that migrate command (without -d) does = not block in some cases. > The original version of hmp.c:hmp_migrate_status_cb checks if the migra= tion status is 'active' or not to detect the complition of a migration. > However, if this function is executed when the migration status is stil= l 'setup' (the status before 'active'), > migration command returns immediately even if the user does not specify= -d option. >=20 > Signed-off-by: Soramichi Akiyama > --- > hmp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/hmp.c b/hmp.c > index 1af0809..eb887bf 100644 > --- a/hmp.c > +++ b/hmp.c > @@ -1234,7 +1234,7 @@ static void hmp_migrate_status_cb(void *opaque) > MigrationInfo *info; > =20 > info =3D qmp_query_migrate(NULL); > - if (!info->has_status || strcmp(info->status, "active") =3D=3D 0) = { > + if (!info->has_status || strcmp(info->status, "active") =3D=3D 0 |= | strcmp(info->status, "setup") =3D=3D 0 ) { > if (info->has_disk) { > int progress; > =20 There's an extra space before the parenthesis. Also please limit patches to 78 characters for code and 76 characters for the commit message in the future. Regards, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg