From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCxIy-0002Ad-L6 for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:18:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCxIu-00033K-7a for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:18:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:62508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCxIt-000332-VT for qemu-devel@nongnu.org; Mon, 10 Feb 2014 15:18:08 -0500 Date: Mon, 10 Feb 2014 15:18:03 -0500 From: Luiz Capitulino Message-ID: <20140210151803.55cfbc4d@redhat.com> In-Reply-To: <52F9339E.6070100@suse.de> References: <20140127194611.679775b92d4be424325b6ecf@nii.ac.jp> <52F9339E.6070100@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: Andreas =?UTF-8?B?RsOkcmJlcg==?= Cc: Soramichi AKIYAMA , qemu-devel@nongnu.org On Mon, 10 Feb 2014 21:16:30 +0100 Andreas F=C3=A4rber wrote: > Hi Soramichi-san, >=20 > 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 >=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. I can fix that myself this time (already fixed the log message anyway).