diff mbox

[v8,5/6] migration: move migrate_postcopy() to include/migration/misc.h

Message ID 1528445443-43406-6-git-send-email-wei.w.wang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang, Wei W June 8, 2018, 8:10 a.m. UTC
The ram save state notifier callback, for example the free page
optimization offerred by virtio-balloon, may need to check if
postcopy is in use, so move migrate_postcopy() to the outside header.

Signed-off-by: Wei Wang <wei.w.wang@intel.com>
CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
CC: Juan Quintela <quintela@redhat.com>
CC: Michael S. Tsirkin <mst@redhat.com>
CC: Peter Xu <peterx@redhat.com>
---
 include/migration/misc.h | 1 +
 migration/migration.h    | 2 --
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Dr. David Alan Gilbert June 29, 2018, 10:35 a.m. UTC | #1
* Wei Wang (wei.w.wang@intel.com) wrote:
> The ram save state notifier callback, for example the free page
> optimization offerred by virtio-balloon, may need to check if
> postcopy is in use, so move migrate_postcopy() to the outside header.

Reasonable,


Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> CC: Dr. David Alan Gilbert <dgilbert@redhat.com>
> CC: Juan Quintela <quintela@redhat.com>
> CC: Michael S. Tsirkin <mst@redhat.com>
> CC: Peter Xu <peterx@redhat.com>
> ---
>  include/migration/misc.h | 1 +
>  migration/migration.h    | 2 --
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/include/migration/misc.h b/include/migration/misc.h
> index b970d7d..911aaf3 100644
> --- a/include/migration/misc.h
> +++ b/include/migration/misc.h
> @@ -109,6 +109,7 @@ bool migration_has_failed(MigrationState *);
>  /* ...and after the device transmission */
>  bool migration_in_postcopy_after_devices(MigrationState *);
>  void migration_global_dump(Monitor *mon);
> +bool migrate_postcopy(void);
>  
>  /* migration/block-dirty-bitmap.c */
>  void dirty_bitmap_mig_init(void);
> diff --git a/migration/migration.h b/migration/migration.h
> index 5a74740..fee5af8 100644
> --- a/migration/migration.h
> +++ b/migration/migration.h
> @@ -236,8 +236,6 @@ bool migration_is_blocked(Error **errp);
>  bool migration_in_postcopy(void);
>  MigrationState *migrate_get_current(void);
>  
> -bool migrate_postcopy(void);
> -
>  bool migrate_release_ram(void);
>  bool migrate_postcopy_ram(void);
>  bool migrate_zero_blocks(void);
> -- 
> 1.8.3.1
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox

Patch

diff --git a/include/migration/misc.h b/include/migration/misc.h
index b970d7d..911aaf3 100644
--- a/include/migration/misc.h
+++ b/include/migration/misc.h
@@ -109,6 +109,7 @@  bool migration_has_failed(MigrationState *);
 /* ...and after the device transmission */
 bool migration_in_postcopy_after_devices(MigrationState *);
 void migration_global_dump(Monitor *mon);
+bool migrate_postcopy(void);
 
 /* migration/block-dirty-bitmap.c */
 void dirty_bitmap_mig_init(void);
diff --git a/migration/migration.h b/migration/migration.h
index 5a74740..fee5af8 100644
--- a/migration/migration.h
+++ b/migration/migration.h
@@ -236,8 +236,6 @@  bool migration_is_blocked(Error **errp);
 bool migration_in_postcopy(void);
 MigrationState *migrate_get_current(void);
 
-bool migrate_postcopy(void);
-
 bool migrate_release_ram(void);
 bool migrate_postcopy_ram(void);
 bool migrate_zero_blocks(void);