From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STyqw-0004Cw-48 for qemu-devel@nongnu.org; Mon, 14 May 2012 13:14:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1STyqu-0002IA-7u for qemu-devel@nongnu.org; Mon, 14 May 2012 13:14:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1STyqt-0002I3-VG for qemu-devel@nongnu.org; Mon, 14 May 2012 13:14:32 -0400 Date: Mon, 14 May 2012 14:14:45 -0300 From: Luiz Capitulino Message-ID: <20120514141445.4de2580c@doriath.home> In-Reply-To: <4FB13B94.4070903@redhat.com> References: <1336763987-10920-1-git-send-email-lcapitulino@redhat.com> <4FB13B94.4070903@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2]: qemu-ga: make shutdown & suspend synchronous List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Privoznik Cc: mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org On Mon, 14 May 2012 19:06:28 +0200 Michal Privoznik wrote: > On 11.05.2012 21:19, Luiz Capitulino wrote: > > The main motivation for this series is fixing two possible race conditions > > in the guest-suspend-* API due to the complexity that arose from the way > > we handle terminated children processes today. Full details in the first > > patch. > > > > This series applies on top of my two other qemu-ga series submitted > > previously: > > > > http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg00999.html > > > > http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg01507.html > > > > qapi-schema-guest.json | 56 ++++++++++------ > > qapi/qmp-core.h | 10 ++- > > qapi/qmp-dispatch.c | 8 ++- > > qapi/qmp-registry.c | 4 +- > > qemu-ga.c | 40 ++++++------ > > qga/commands-posix.c | 162 ++++++++++++++++++---------------------------- > > qga/guest-agent-core.h | 4 ++ > > scripts/qapi-commands.py | 14 +++- > > 8 files changed, 154 insertions(+), 144 deletions(-) > > > > Okay, this is definitely an enhancement and fix of bogus implementation. > One thing that I'd like to ask is - how can user distinguish between > these implementations. I am asking basically from libvirt POV. > Because if I assume I am dealing with the previous implementation and > thus waiting for the {'return':{}} before I can return form an API, but > the GA actually uses the new implementation I will block endlessly. There's no way to distinguish. It's a bug to wait for an OK response for the guest-shutdown and guest-suspend-*, because a response may not been sent even before this series (and this is correctly documented).