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().

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to