Re: [PATCH v2 11/12] migration: reuse flags vs features checks in toURI family

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

 




On 17.09.2015 18:07, John Ferlan wrote:
> 
> 
> On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote:
>> Introduce a new function for the check. virDomainMigrateUnmanagedParams is not
>> a good candidate for this functionality as it is used by migrate family
>> functions too and its have its own checks that are superset of extracted and we
>> don't need to check twice.
>>
>> Actually name of the function is slightly misleading as there is also a check
>> for consitensy of flags parameter alone. So it could be refactored further and
> 
> s/consitensy/consistency
> 
>> reused by all migrate functions bu for now let it be a matter of a different
>> patchset.
>>
>> It is *not* a pure refactoring patch as it introduces offline check for all
>> versions. Looks like it must be done that way and no one will be broken too.
>>
>> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx>
>> ---
>>  src/libvirt-domain.c |   81 +++++++++++++++++++------------------------------
>>  1 files changed, 32 insertions(+), 49 deletions(-)
>>
>> diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
>> index 483537a..2d98997 100644
>> --- a/src/libvirt-domain.c
>> +++ b/src/libvirt-domain.c
>> @@ -4108,6 +4108,35 @@ virDomainMigrate3(virDomainPtr domain,
>>      return NULL;
>>  }
>>  
>> +static
>> +int virDomainMigrateUnmanagedCheckCompat(virDomainPtr domain, unsigned int flags)
> 
> Should be:
> 
> static int
> virDomainMigrateUnmanagedCheckCompat(virDomainPtr domain,
>                                      unsigned int flags)
> 
> The "unsigned int flags" should be a separate line
> 
> Be sure to keep 2 blank lines between functions...
> 
> Also I now see where you lifted the changes in patch 10 from.  Makes me
> wonder if the two should change slightly such that patch 10 becomes
> create the new API with the only caller virDomainMigrateToURI.  Then
> patch 11 becomes, modify virDomainMigrateToURI2 && URI3 to call it
> rather than compressing the checks.

Good suggestion! will re-refactor)

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