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