[libvirt] [PATCH] qemu: process: comment on min_guarantee validation

Cole Robinson crobinso at redhat.com
Wed Apr 20 21:02:25 UTC 2016


On 04/20/2016 03:29 AM, Peter Krempa wrote:
> On Tue, Apr 19, 2016 at 12:03:08 -0400, Cole Robinson wrote:
>> It's not a matter of 'insist'ing or not; when in this area of the code I saw
>> the min_guarantee check, which seemed out of place, since there are already
>> several such checks in the postparse handler.There's no comment explaining why
>> the min_guarantee check is there specifically (or the other XML checks), and
>> nothing specific in the commit message for the min_guarantee block. Hence my
>> confusion and desire to document it, and hopefully save other people the
>> confusion, and prevent future XML validation checks being added there which
>> are safe to do at parse time.
> 
> Well I think the semantics of adding checks are very simple. If you are
> adding a new feature/element you can add it to the post parse check. If
> you are trying to check something that was already released you should
> not add it to the post parse check. Otherwise defined domains may
> vanish.
> 

Yes they are simple... once you know them ;) I didn't when wandering into that
part of the code, hence the desire to document it.

> 
>> And they are explicitly done at process startup time for back compat reasons.
>> So I'll stick them in a function like qemuProcessStartValidateXML(), with a
>> comment explaining why here and not at parse time. Sound good?
> 
> Yes.
> 

Thanks, patches sent

- Cole




More information about the libvir-list mailing list