Re: [PATCH 8/8] Allow balloon driver collection to be adjusted dynamically

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

 



On 07/03/2013 08:03 AM, Michal Privoznik wrote:
> On 02.07.2013 15:39, John Ferlan wrote:
>> Extend the virDomainSetMemeoryFlags() to accept a 'VIR_DOMAIN_MEM_PERIOD'
>> which will be used to dynamically set the collection period for the balloon
>> driver via a 'virsh dommemstat <domain> --period <value>' command.  Add
>> the --current, --live, & --config options to dommemstat.
>> ---
>>  docs/formatdomain.html.in    | 14 +++++++++
>>  include/libvirt/libvirt.h.in |  1 +
>>  src/libvirt.c                |  8 ++++-
>>  src/qemu/qemu_driver.c       | 44 +++++++++++++++++++++++++++-
>>  tools/virsh-domain-monitor.c | 70 ++++++++++++++++++++++++++++++++++++++++++--
>>  5 files changed, 132 insertions(+), 5 deletions(-)
> 
>> diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c

...snip...
>>  
>>      if (!(dom = vshCommandOptDomain(ctl, cmd, &name)))
>>          return false;
>>  
>> +    /* none of the options were specified - choose defaults based on state */
>> +    if (!current && !live && !config) {
>> +        if (virDomainIsActive(dom) == 1)
>> +            flags |= VIR_DOMAIN_AFFECT_LIVE;
>> +        else
>> +            flags |= VIR_DOMAIN_AFFECT_CONFIG;
> 
> This should not be needed as qemu driver will the proper option for
> VIR_DOMAIN_AFFECT_CURRENT. Client can't make such decision as domain is
> not locked and may translate into different state.
> 

I removed the 'else' condition and merely was following other examples
for the 'if' option.

John



> 
> Michal
> 

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