Re: [libvirt-perl PATCH v2] Virt.xs: fix flag issue on set_scheduler_parameters

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

 



On 08/29/2012 03:03 AM, Alex Jia wrote:
> From: Alex Jia <Alex Jia ajia@xxxxxxxxxx>
> 
> The default flags are inconsistent on both qemuSetSchedulerParameters()
> and qemuGetSchedulerParameters() in libvirt, the qemuGetSchedulerParameters()
> always passes 'VIR_DOMAIN_AFFECT_CURRENT' flag to the qemuGetSchedulerParametersFlags(),
> it should be a expected behavior, but the qemuSetSchedulerParameters() always passes
> 'VIR_DOMAIN_AFFECT_LIVE' flag to the qemuSetSchedulerParametersFlags(), if users use
> default flag=0 or explicitly give a 'VIR_DOMAIN_AFFECT_CURRENT' flag to the
> set_scheduler_parameters() in perl-Sys-Virt, because the flag value is 0, the result is
> the virDomainSetSchedulerParameters() is called incorrectly.
> 
> In fact, it's enough to call the qemuSetSchedulerParametersFlags() regardless of what flag is
> like 'virsh schedinfo' command.

But doing this makes it harder to talk to older libvirtd that lacked the
new function.  I'm not sure whether we want to blindly force the need
for the newer function to exist, or whether we should be reproducing the
same logic for deciding when to try the older API based on the flags
presented by the user.

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

Attachment: signature.asc
Description: OpenPGP 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]