[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 06/12] savevm: introduce is_active method

From: Juan Quintela
Subject: Re: [Qemu-devel] [PATCH 06/12] savevm: introduce is_active method
Date: Sun, 01 Jul 2012 12:44:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux)

Igor Mitsyanko <address@hidden> wrote:
> On 6/28/2012 11:22 PM, Juan Quintela wrote:
>> Enable the creation of a method to tell migration if that section is
>> active and should be migrate.  We use it for blk-migration, that is
>> normally not active.  We don't create the method for RAM, as setups
>> without RAM are very strange O:-)
>> Signed-off-by: Juan Quintela <address@hidden>
>> @@ -1576,6 +1576,11 @@ int qemu_savevm_state_begin(QEMUFile *f,
>>           if (!se->ops || !se->ops->save_live_state) {
>>               continue;
>>           }
>> +        if (se->ops && se->ops->is_active) {
>> +            if (!se->ops->is_active(se->opaque)) {
> If we got here then we know for sure that se->ops != NULL,and then
> nested condition could be simplified to if (se->ops->is_active &&
> !se->ops->is_active(se->opaque)). Same for qemu_savevm_state_iterate()
> amd qemu_savevm_state_complete()

I tried to maintain consistency with the previous test, i.e. all have
the same structure.  I am still not sure which one is better :-()

The approach that I did put the things in the same order, yours, remove
two lines and one && operand.

Will think about that one, thanks.

Later, Juan.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]