[libvirt] [PATCH v2 7/7] qemuDomainChangeDiskLive: Allow startupPolicy change

Michal Privoznik mprivozn at redhat.com
Mon Sep 21 05:26:08 UTC 2015


On 18.09.2015 22:47, John Ferlan wrote:
> 
> 
> On 09/16/2015 05:15 AM, Michal Privoznik wrote:
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  src/qemu/qemu_domain.c |  1 -
>>  src/qemu/qemu_driver.c | 29 ++++++++++++++++++++---------
>>  2 files changed, 20 insertions(+), 10 deletions(-)
>>
>> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>> index ed92d8a..fb8ab30 100644
>> --- a/src/qemu/qemu_domain.c
>> +++ b/src/qemu/qemu_domain.c
>> @@ -3157,7 +3157,6 @@ qemuDomainDiskChangeSupported(virDomainDiskDefPtr disk,
>>      CHECK_EQ(event_idx, "event_idx", true);
>>      CHECK_EQ(copy_on_read, "copy_on_read", true);
>>      CHECK_EQ(snapshot, "snapshot", true);
>> -    CHECK_EQ(startupPolicy, "startupPolicy", true);
> 
> Perhaps leave a comment indicating that startupPolicy is special so that
> someone doesn't come along one day and say - oh look startupPolicy is
> missing, I'm going to add it here... Assuming one reads comments ;-)

Good point. Added.

> 
> It's really too bad there isn't some "simple mechanism" to ensure new
> fields are listed here too.

Yeah. Perhaps some autogenerated function. But that would mean parsing C
code, which alone explodes straight away.

Michal




More information about the libvir-list mailing list