"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote:
> * Juan Quintela (quint...@redhat.com) wrote:
>> Signed-off-by: Juan Quintela <quint...@redhat.com>
>> ---
>>  migration/ram.c | 14 +++++++-------
>>  1 file changed, 7 insertions(+), 7 deletions(-)
>> 
>> diff --git a/migration/ram.c b/migration/ram.c
>> index b1a031e..57b776b 100644
>> --- a/migration/ram.c
>> +++ b/migration/ram.c
>> @@ -171,8 +171,8 @@ struct RAMState {
>>      RAMBlock *last_seen_block;
>>      /* Last block from where we have sent data */
>>      RAMBlock *last_sent_block;
>> -    /* Last offset we have sent data from */
>> -    ram_addr_t last_offset;
>> +    /* Last dirty page we have sent */
>
> Can you make that 'Last dirty target page we have sent' 
> just so we know which shape page we're dealing with.

Done.

>> +    ram_addr_t last_page;
>>      /* last ram version we have seen */
>>      uint32_t last_version;
>>      /* We are in the first round */
>> @@ -1063,7 +1063,7 @@ static bool find_dirty_block(RAMState *rs, 
>> PageSearchStatus *pss,
>>      pss->offset = migration_bitmap_find_dirty(rs, pss->block, pss->offset,
>>                                                page);
>>      if (pss->complete_round && pss->block == rs->last_seen_block &&
>> -        pss->offset >= rs->last_offset) {
>> +        pss->offset >= rs->last_page) {
>
> That's odd; isn't pss->offset still in bytes?

It is not odd, it is wrong.

Fixed.

Thanks, Juan.

Reply via email to