qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Juan Quintela <quintela@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/3] migration: loadvm handlers are not used
Date: Tue, 30 May 2017 11:36:07 +0200	[thread overview]
Message-ID: <d06e3b0f-d56c-c16b-797e-9ad50851d7c9@redhat.com> (raw)
In-Reply-To: <20170530083705.15141-3-quintela@redhat.com>

On 30/05/2017 10:37, Juan Quintela wrote:
> So we remove all traces of them.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Laurent Vivier <lvivier@redhat.com>

> ---
>  include/migration/migration.h |  5 -----
>  include/migration/vmstate.h   |  2 --
>  include/qemu/typedefs.h       |  1 -
>  migration/migration.c         |  2 --
>  migration/savevm.c            | 26 --------------------------
>  5 files changed, 36 deletions(-)
> 
> diff --git a/include/migration/migration.h b/include/migration/migration.h
> index 0e807b6..d1a353a 100644
> --- a/include/migration/migration.h
> +++ b/include/migration/migration.h
> @@ -50,8 +50,6 @@ enum mig_rp_message_type {
>      MIG_RP_MSG_MAX
>  };
>  
> -typedef QLIST_HEAD(, LoadStateEntry) LoadStateEntry_Head;
> -
>  /* State for the incoming migration */
>  struct MigrationIncomingState {
>      QEMUFile *from_src_file;
> @@ -89,9 +87,6 @@ struct MigrationIncomingState {
>      /* The coroutine we should enter (back) after failover */
>      Coroutine *migration_incoming_co;
>      QemuSemaphore colo_incoming_sem;
> -
> -    /* See savevm.c */
> -    LoadStateEntry_Head loadvm_handlers;
>  };
>  
>  MigrationIncomingState *migration_incoming_get_current(void);
> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
> index f97411d..6689562 100644
> --- a/include/migration/vmstate.h
> +++ b/include/migration/vmstate.h
> @@ -1020,8 +1020,6 @@ extern const VMStateInfo vmstate_info_qtailq;
>  
>  #define SELF_ANNOUNCE_ROUNDS 5
>  
> -void loadvm_free_handlers(MigrationIncomingState *mis);
> -
>  int vmstate_load_state(QEMUFile *f, const VMStateDescription *vmsd,
>                         void *opaque, int version_id);
>  void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd,
> diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
> index 33a6aa1..51958bf 100644
> --- a/include/qemu/typedefs.h
> +++ b/include/qemu/typedefs.h
> @@ -39,7 +39,6 @@ typedef struct I2SCodec I2SCodec;
>  typedef struct ISABus ISABus;
>  typedef struct ISADevice ISADevice;
>  typedef struct IsaDma IsaDma;
> -typedef struct LoadStateEntry LoadStateEntry;
>  typedef struct MACAddr MACAddr;
>  typedef struct MachineClass MachineClass;
>  typedef struct MachineState MachineState;
> diff --git a/migration/migration.c b/migration/migration.c
> index ad29e53..891a260 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
> @@ -121,7 +121,6 @@ MigrationIncomingState *migration_incoming_get_current(void)
>      if (!once) {
>          mis_current.state = MIGRATION_STATUS_NONE;
>          memset(&mis_current, 0, sizeof(MigrationIncomingState));
> -        QLIST_INIT(&mis_current.loadvm_handlers);
>          qemu_mutex_init(&mis_current.rp_mutex);
>          qemu_event_init(&mis_current.main_thread_load_event, false);
>          once = true;
> @@ -134,7 +133,6 @@ void migration_incoming_state_destroy(void)
>      struct MigrationIncomingState *mis = migration_incoming_get_current();
>  
>      qemu_event_destroy(&mis->main_thread_load_event);
> -    loadvm_free_handlers(mis);
>  }
>  
>  
> diff --git a/migration/savevm.c b/migration/savevm.c
> index d7c08c3..14af5ad 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1781,13 +1781,6 @@ static int loadvm_process_command(QEMUFile *f)
>      return 0;
>  }
>  
> -struct LoadStateEntry {
> -    QLIST_ENTRY(LoadStateEntry) entry;
> -    SaveStateEntry *se;
> -    int section_id;
> -    int version_id;
> -};
> -
>  /*
>   * Read a footer off the wire and check that it matches the expected section
>   *
> @@ -1823,22 +1816,11 @@ static bool check_section_footer(QEMUFile *f, SaveStateEntry *se)
>      return true;
>  }
>  
> -void loadvm_free_handlers(MigrationIncomingState *mis)
> -{
> -    LoadStateEntry *le, *new_le;
> -
> -    QLIST_FOREACH_SAFE(le, &mis->loadvm_handlers, entry, new_le) {
> -        QLIST_REMOVE(le, entry);
> -        g_free(le);
> -    }
> -}
> -
>  static int
>  qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
>  {
>      uint32_t instance_id, version_id, section_id;
>      SaveStateEntry *se;
> -    LoadStateEntry *le;
>      char idstr[256];
>      int ret;
>  
> @@ -1876,14 +1858,6 @@ qemu_loadvm_section_start_full(QEMUFile *f, MigrationIncomingState *mis)
>          return -EINVAL;
>      }
>  
> -    /* Add entry */
> -    le = g_malloc0(sizeof(*le));
> -
> -    le->se = se;
> -    le->section_id = section_id;
> -    le->version_id = version_id;
> -    QLIST_INSERT_HEAD(&mis->loadvm_handlers, le, entry);
> -
>      ret = vmstate_load(f, se, se->load_version_id);
>      if (ret < 0) {
>          error_report("error while loading state for instance 0x%x of"
> 

  reply	other threads:[~2017-05-30  9:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30  8:37 [Qemu-devel] [PATCH v2 0/3] Remove of loadvm handlers Juan Quintela
2017-05-30  8:37 ` [Qemu-devel] [PATCH v2 1/3] migration: Use savevm_handlers instead of loadvm copy Juan Quintela
2017-05-30  9:19   ` Laurent Vivier
2017-05-30 17:30   ` Dr. David Alan Gilbert
2017-05-30 18:35     ` Juan Quintela
2017-05-30  8:37 ` [Qemu-devel] [PATCH v2 2/3] migration: loadvm handlers are not used Juan Quintela
2017-05-30  9:36   ` Laurent Vivier [this message]
2017-05-30  8:37 ` [Qemu-devel] [PATCH v2 3/3] migration: Remove section_id parameter from vmstate_load Juan Quintela
2017-05-30  9:36   ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d06e3b0f-d56c-c16b-797e-9ad50851d7c9@redhat.com \
    --to=lvivier@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).