[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 24/42] Add qemu_savevm_state_complete_postcop
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v7 24/42] Add qemu_savevm_state_complete_postcopy |
Date: |
Mon, 13 Jul 2015 13:35:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"Dr. David Alan Gilbert (git)" <address@hidden> wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
>
> Add qemu_savevm_state_complete_postcopy to complement
> qemu_savevm_state_complete_precopy together with a new
> save_live_complete_postcopy method on devices.
>
> The save_live_complete_precopy method is called on
> all devices during a precopy migration, and all non-postcopy
> devices during a postcopy migration at the transition.
>
> The save_live_complete_postcopy method is called at
> the end of postcopy for all postcopiable devices.
>
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
> @@ -947,13 +987,15 @@ void qemu_savevm_state_complete_precopy(QEMUFile *f)
> int vmdesc_len;
> SaveStateEntry *se;
> int ret;
> + bool in_postcopy = migration_postcopy_phase(migrate_get_current());
>
> trace_savevm_state_complete_precopy();
>
> cpu_synchronize_all_states();
>
> QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
> - if (!se->ops || !se->ops->save_live_complete_precopy) {
> + if (!se->ops || !se->ops->save_live_complete_precopy ||
> + (in_postcopy && se->ops->save_live_complete_postcopy)) {
> continue;
> }
I would change the formatting to something like:
if (!se->ops ||
(in_postcopy && se->ops->save_live_complete_postcopy)
!se->ops->save_live_complete_precopy) {
continue
}
Just to make easier to see when we exit?
Later, Juan.
- Re: [Qemu-devel] [PATCH v7 24/42] Add qemu_savevm_state_complete_postcopy,
Juan Quintela <=