From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdKgc-0004cx-De for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:59:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VdKgY-0001r2-1Y for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:59:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17147) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VdKgX-0001qw-PG for qemu-devel@nongnu.org; Mon, 04 Nov 2013 08:59:17 -0500 Message-ID: <5277A82E.5060605@redhat.com> Date: Mon, 04 Nov 2013 06:59:10 -0700 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aF9CSKkatnTrqsRengVsKw1RsLLwe9fN9" Subject: Re: [Qemu-devel] [PATCH] migration: avoid starting a new migration task while the previous one still exist List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Zhanghaoyu (A)" , "qemu-devel@nongnu.org" , Gleb Natapov , "Michael S. Tsirkin" , "paolo.bonzini@gmail.com" , Marcelo Tosatti Cc: "Huangweidong (C)" , Luonengjun , "Wangrui (K)" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aF9CSKkatnTrqsRengVsKw1RsLLwe9fN9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 11/04/2013 04:26 AM, Zhanghaoyu (A) wrote: > Avoid starting a new migration task while the previous one still exist.= >=20 > Signed-off-by: Zeng Junliang > --- It's best to put comments here... > migration.c | 34 ++++++++++++++++++++++------------ > 1 files changed, 22 insertions(+), 12 deletions(-) =2E.. > s->downtime =3D end_time - start_time; > -- 1.7.3.1.msysgit.0 BTW, while error happened during migration, need > the "erroring" state to avoid starting a new migration task while > current migration task still exist? And, do the new added migration > states need to be reported to libvirt? =2E..rather than here, since most mail clients will strip anything after the '-- ' separator output by git as if it were the signature, making it very difficult to reply to (as you can see, my mailer corrupted the formatting of your question due to how I forced it to reply to your signature). As to whether libvirt needs to know about the state, I'm not sure. Libvirt already has its own code to prevent concurrent attempts at migration, so theoretically libvirt should never trip the situation that you appear to be coding for. Perhaps providing more details in the commit message about how to actually get into the situation will make it easier to evaluate. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --aF9CSKkatnTrqsRengVsKw1RsLLwe9fN9 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSd6guAAoJEKeha0olJ0NqCF0IAKXNi/FuEtWicF2UL3hovHwn 4le5GU52SomX8LDNd8+qqXecKiL0S+XKJqN/JPkb025QPXpiDCRnXcwayKwZKQws gNwFMkoj/dCaRWB48qwRXGbq+FwfxKBT2H26jAWuyCraql5UOAqKPJYlhzlQteKg bOf7rziQLswD53Egp9KTqB2TOy0Yo0j2fZ5UwOVheNHTs3jHLcgFT421W72QpbkM DH0fueE1X2vWI1OY0fMj1pO2PCxrL/suDiu7tj5DH/fBbCzRa0CPl8rUTZpz5Qm/ MvZDothvMxXtCF/w1gFjt5nwqyTSpL5WelsHKG1Xi2sFMSt021pMEX/hXr4O1HU= =MbRr -----END PGP SIGNATURE----- --aF9CSKkatnTrqsRengVsKw1RsLLwe9fN9--