From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjI9Y-0001pV-WB for qemu-devel@nongnu.org; Tue, 19 Jul 2011 17:48:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjI9U-0007N9-1v for qemu-devel@nongnu.org; Tue, 19 Jul 2011 17:48:32 -0400 Received: from fmmailgate03.web.de ([217.72.192.234]:52792) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjI9T-0007Mq-Cw for qemu-devel@nongnu.org; Tue, 19 Jul 2011 17:48:27 -0400 Message-ID: <4E25FBA6.3060803@web.de> Date: Tue, 19 Jul 2011 23:48:22 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <20110719115511.609C553E5@gandalf.tls.msk.ru> In-Reply-To: <20110719115511.609C553E5@gandalf.tls.msk.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig987C06ABE5C907FD11C62105" Sender: jan.kiszka@web.de Subject: Re: [Qemu-devel] [PATCH] do not call monitor_resume() from migrate_fd_put_buffer() error path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev , Marcelo Tosatti Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig987C06ABE5C907FD11C62105 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable On 2011-07-19 13:46, Michael Tokarev wrote: > If we do, it results in double monitor_resume() (second being called > from migrate_fd_cleanup() anyway) and monitor suspend count becoming > negative. >=20 > Cc'ing people from `git blame' list for the lines in question: the > change fixes the problem but I'm not sure what the original intention > of this code was in this place. Unfortunately noone replied to two > my attempts to raise this issue. >=20 > Signed-Off-By: Michael Tokarev > --- > migration.c | 3 --- > 1 files changed, 0 insertions(+), 3 deletions(-) >=20 > diff --git a/migration.c b/migration.c > index af3a1f2..115588c 100644 > --- a/migration.c > +++ b/migration.c > @@ -330,9 +330,6 @@ ssize_t migrate_fd_put_buffer(void *opaque, const v= oid *data, size_t size) > if (ret =3D=3D -EAGAIN) { > qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify,= s); > } else if (ret < 0) { > - if (s->mon) { > - monitor_resume(s->mon); > - } > s->state =3D MIG_STATE_ERROR; > notifier_list_notify(&migration_state_notifiers); > } Looks reasonable to me, but Marcelo should comment on this, specifically which scenario once required the resume. Jan --------------enig987C06ABE5C907FD11C62105 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk4l+6kACgkQitSsb3rl5xSY2ACghXPoVupl4UpscW/xEvQ1Ks6/ /74AoNEntgczFgY3LX9LGnSvk3pxxDJW =NkYa -----END PGP SIGNATURE----- --------------enig987C06ABE5C907FD11C62105--