From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THEUw-0001eu-Dq for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:51:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THEUq-0004Jl-5D for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:51:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8521) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THEUp-0004Jb-TM for qemu-devel@nongnu.org; Thu, 27 Sep 2012 09:51:20 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8RDpIBm018650 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 Sep 2012 09:51:19 -0400 Message-ID: <506459D3.3010801@redhat.com> Date: Thu, 27 Sep 2012 15:51:15 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1348675011-8794-1-git-send-email-pbonzini@redhat.com> <1348675011-8794-7-git-send-email-pbonzini@redhat.com> <50644417.9080408@redhat.com> <50644641.8020203@redhat.com> <50644A82.3010007@redhat.com> <50644D42.6040303@redhat.com> In-Reply-To: <50644D42.6040303@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 06/45] block: add support for job pause/resume List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jcody@redhat.com, qemu-devel@nongnu.org Am 27.09.2012 14:57, schrieb Paolo Bonzini: > Il 27/09/2012 14:45, Kevin Wolf ha scritto: >> Am 27.09.2012 14:27, schrieb Paolo Bonzini: >>> Il 27/09/2012 14:18, Kevin Wolf ha scritto: >>>>>> >>>>>> Signed-off-by: Paolo Bonzini >>>> I think there's a problem with terminology at least. What does "paused" >>>> really mean? Is it that the job has been requested to pause, or that it >>>> has actually yielded and is inactive? >>>> >>>> The commit message seems to use the latter semantics (which I would >>>> consider the intuitive one), >>> >>> You mean this: "Paused jobs cannot be canceled without first resuming >>> them". I can add a specification, like "(even if the job actually has >>> not reached the sleeping point and thus is still running)". >> >> I actually meant "pause happens at the next sleeping point", which isn't >> unspecific at all. > > Hmm, there are two aspects: 1) when things stop running; 2) when the job > reports itself to be paused. The commit message describes (1) > precisely, and doesn't say anything about (2). That's too specific for > a commit message, but the header file describes it precisely. Yes, I understood that, I just found it confusing that both were called "paused" in different contexts. > However, in the QMP documentation, the good comment for "bool paused;" > must be replicated in BlockJobInfo's "paused" member. > >>> From the QMP client's point of view it doesn't really matter, does it? >>> >>> - even after a job that writes to disk X has "really" paused, you cannot >>> read or write disk X. It's still owned by QEMU, it hasn't been flushed, >>> it may play games like lazy refcounts. >> >> I'm not sure about this one. Consider things like a built-in NBD server. >> Probably we'll find more cases in the future, where some monitor command >> might seem to be safe while a job is paused. > > Ok, that's a good point. I'll add a "busy" member to BlockJobInfo. Ok, thanks. Together with the comment from the bool paused field this should make pretty clear what clients would have to check for. Kevin