[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/5] migration: Convert ram to use new load_s
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/5] migration: Convert ram to use new load_setup()/load_cleanup() |
Date: |
Wed, 21 Jun 2017 13:33:01 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
"Dr. David Alan Gilbert" <address@hidden> wrote:
> * Juan Quintela (address@hidden) wrote:
>> Once there, I rename ram_migration_cleanup() to ram_save_cleanup().
>> Notice that this is the first pass, and I only passed XBZRLE to the
>> new scheme. Moved decoded_buf to inside XBZRLE struct.
>> As a bonus, I don't have to export xbzrle functions from ram.c.
>>
>> Signed-off-by: Juan Quintela <address@hidden>
>> }
>> /* load data and decode */
>> - qemu_get_buffer_in_place(f, &loaded_data, xh_len);
>> + qemu_get_buffer_in_place(f, &XBZRLE.decoded_buf, xh_len);
>
> No ! Note the & - loaded_data can get changed at that point to
> point to an internal buffer rather than using that temporary.
>
> So you still need the loaded_data and use that in the rest of
> this function.
You are right.
I hate that nuances.
Thanks for the review.
Later, Juan.
- [Qemu-devel] [PATCH v2 0/5] Create setup/cleanup methods for migration incoming side, Juan Quintela, 2017/06/13
- [Qemu-devel] [PATCH v2 1/5] migration: Rename save_live_setup() to save_setup(), Juan Quintela, 2017/06/13
- [Qemu-devel] [PATCH v2 2/5] migration: Rename cleanup() to save_cleanup(), Juan Quintela, 2017/06/13
- [Qemu-devel] [PATCH v2 3/5] migration: Create load_setup()/cleanup() methods, Juan Quintela, 2017/06/13
- [Qemu-devel] [PATCH v2 4/5] migration: Convert ram to use new load_setup()/load_cleanup(), Juan Quintela, 2017/06/13
- [Qemu-devel] [PATCH v2 5/5] migration: Make compression_threads use save/load_setup/cleanup(), Juan Quintela, 2017/06/13