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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 18, 2016 at 19:13:08 -0400, Cole Robinson wrote:
> Explain why we check it at process startup time, and not parse time
> where most other XML validation checks are performed

This is far from being a singular case ...

> ---
>  src/qemu/qemu_process.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index c087300..628b4b6 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -4550,6 +4550,8 @@ qemuProcessStartValidate(virQEMUDriverPtr driver,
>          virDomainDefCheckDuplicateDiskInfo(vm->def) < 0)

... this is yet another example of a similar check.

>          return -1;
>  
> +    /* Previously we silently accepted this parameter; we can't reject
> +       it at parse time without breaking those configs, so check it here */

I don't think this helps here and implies that other checks are not here
due to that case. If you want to be explicit I think it warrants a
separate function with this fact stated in it's comment. If you insist
on being explicit in the purpose of this check

>      if (vm->def->mem.min_guarantee) {
>          virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
>                         _("Parameter 'min_guarantee' "
> -- 
> 2.7.3
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]