From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDHRL-0000pL-91 for qemu-devel@nongnu.org; Wed, 06 Mar 2013 11:43:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDHRH-0002Qz-TQ for qemu-devel@nongnu.org; Wed, 06 Mar 2013 11:43:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDHRH-0002Qn-LD for qemu-devel@nongnu.org; Wed, 06 Mar 2013 11:43:35 -0500 Message-ID: <513770CD.2020003@redhat.com> Date: Wed, 06 Mar 2013 17:37:33 +0100 From: Laszlo Ersek MIME-Version: 1.0 References: <1362435597-20018-1-git-send-email-lersek@redhat.com> <1362435597-20018-2-git-send-email-lersek@redhat.com> <51365EC2.8050903@redhat.com> <51367A50.6040405@redhat.com> <51374958.7030907@redhat.com> In-Reply-To: <51374958.7030907@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/3] qga: introduce guest-get-vcpus / guest-set-vcpus with stubs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Drew Jones , mdroth@linux.vnet.ibm.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, pbonzini@redhat.com, Karen Noel On 03/06/13 14:49, Eric Blake wrote: > On 03/05/2013 04:05 PM, Laszlo Ersek wrote: >>>> +# If part or whole of the requested operation can't be carried out, the guest >>>> +# VCPU state will be unspecified. >>> >>> Completely unspecified? >> >> Yes. "Unspecified" means "valid" (ie. at least one VCPU will be online, >> the guest won't be "dead"), but no further info will be returned at once. > > Hmm, just thinking aloud here (not saying we need to swap interfaces, > unless you like this alternative): > > What if we have guest-set-vcpus return a non-negative integer on > success; namely, the number of consecutive array actions that were > completed, and guarantee successful exit on first failure if any prior > element was acted on? Passing an empty array, or failing on the first > array element, would give an error; otherwise, the error is lost if a > user batches commands, but they would know how much of the batch failed, > and can retry the command with the failing entry first to see what the > failure was (assuming the failure is reproducible). Basically, this > would make guest-set-vcpus do partial write detection somewhat like write(). You can sell me anything POSIX :) Thanks! Laszlo