Patchwork [19/41] migration: reorder SaveVMHandlers members

login
register
mail settings
Submitter Paolo Bonzini
Date Feb. 15, 2013, 5:46 p.m.
Message ID <1360950433-17106-20-git-send-email-pbonzini@redhat.com>
Download mbox | patch
Permalink /patch/220793/
State New
Headers show

Comments

Paolo Bonzini - Feb. 15, 2013, 5:46 p.m.
This groups together the callbacks that later will have similar
locking rules.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/migration/vmstate.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
Orit Wasserman - Feb. 18, 2013, 2:35 p.m.
On 02/15/2013 07:46 PM, Paolo Bonzini wrote:
> This groups together the callbacks that later will have similar
> locking rules.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  include/migration/vmstate.h |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index f27276c..6229569 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -32,13 +32,15 @@ typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
>  typedef struct SaveVMHandlers {
>      void (*set_params)(const MigrationParams *params, void * opaque);
>      SaveStateHandler *save_state;
> +
>      int (*save_live_setup)(QEMUFile *f, void *opaque);
> -    int (*save_live_iterate)(QEMUFile *f, void *opaque);
> +    void (*cancel)(void *opaque);
>      int (*save_live_complete)(QEMUFile *f, void *opaque);
> +    bool (*is_active)(void *opaque);
> +    int (*save_live_iterate)(QEMUFile *f, void *opaque);
>      uint64_t (*save_live_pending)(QEMUFile *f, void *opaque, uint64_t max_size);
> -    void (*cancel)(void *opaque);
> +
>      LoadStateHandler *load_state;
> -    bool (*is_active)(void *opaque);
>  } SaveVMHandlers;
>  
>  int register_savevm(DeviceState *dev,
> 
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Juan Quintela - Feb. 22, 2013, 11:05 a.m.
Paolo Bonzini <pbonzini@redhat.com> wrote:
> This groups together the callbacks that later will have similar
> locking rules.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>

Patch

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index f27276c..6229569 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -32,13 +32,15 @@  typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
 typedef struct SaveVMHandlers {
     void (*set_params)(const MigrationParams *params, void * opaque);
     SaveStateHandler *save_state;
+
     int (*save_live_setup)(QEMUFile *f, void *opaque);
-    int (*save_live_iterate)(QEMUFile *f, void *opaque);
+    void (*cancel)(void *opaque);
     int (*save_live_complete)(QEMUFile *f, void *opaque);
+    bool (*is_active)(void *opaque);
+    int (*save_live_iterate)(QEMUFile *f, void *opaque);
     uint64_t (*save_live_pending)(QEMUFile *f, void *opaque, uint64_t max_size);
-    void (*cancel)(void *opaque);
+
     LoadStateHandler *load_state;
-    bool (*is_active)(void *opaque);
 } SaveVMHandlers;
 
 int register_savevm(DeviceState *dev,