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

Peter Krempa pkrempa at redhat.com
Wed Apr 20 07:29:50 UTC 2016


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.

...

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

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160420/8aab31a2/attachment-0001.sig>


More information about the libvir-list mailing list