qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com, peterx@redhat.com,
	kwolf@redhat.com, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/5] migration: Rename cleanup() to save_cleanup()
Date: Fri, 16 Jun 2017 18:33:15 +0100	[thread overview]
Message-ID: <20170616173315.GC19805@work-vm> (raw)
In-Reply-To: <20170613095338.11560-3-quintela@redhat.com>

* Juan Quintela (quintela@redhat.com) wrote:
> We need a cleanup for loads, so we rename here to be consistent.
> 
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
>  hw/ppc/spapr.c               | 2 +-
>  include/migration/register.h | 2 +-
>  migration/block.c            | 2 +-
>  migration/ram.c              | 2 +-
>  migration/savevm.c           | 4 ++--
>  5 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 7db5396..dabf822 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -1871,7 +1871,7 @@ static SaveVMHandlers savevm_htab_handlers = {
>      .save_setup = htab_save_setup,
>      .save_live_iterate = htab_save_iterate,
>      .save_live_complete_precopy = htab_save_complete,
> -    .cleanup = htab_cleanup,
> +    .save_cleanup = htab_cleanup,
>      .load_state = htab_load,

It might make sense to follow the rename through so that those
become htab_save_cleanup.

However, only minor.


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

>  };
>  
> diff --git a/include/migration/register.h b/include/migration/register.h
> index 333e3df..9ad1e4c 100644
> --- a/include/migration/register.h
> +++ b/include/migration/register.h
> @@ -21,7 +21,7 @@ typedef struct SaveVMHandlers {
>      /* This runs inside the iothread lock.  */
>      SaveStateHandler *save_state;
>  
> -    void (*cleanup)(void *opaque);
> +    void (*save_cleanup)(void *opaque);
>      int (*save_live_complete_postcopy)(QEMUFile *f, void *opaque);
>      int (*save_live_complete_precopy)(QEMUFile *f, void *opaque);
>  
> diff --git a/migration/block.c b/migration/block.c
> index c160d41..ad36afb 100644
> --- a/migration/block.c
> +++ b/migration/block.c
> @@ -1012,7 +1012,7 @@ static SaveVMHandlers savevm_block_handlers = {
>      .save_live_complete_precopy = block_save_complete,
>      .save_live_pending = block_save_pending,
>      .load_state = block_load,
> -    .cleanup = block_migration_cleanup,
> +    .save_cleanup = block_migration_cleanup,
>      .is_active = block_is_active,
>  };
>  
> diff --git a/migration/ram.c b/migration/ram.c
> index 3454bf7..be78e42 100644
> --- a/migration/ram.c
> +++ b/migration/ram.c
> @@ -2611,7 +2611,7 @@ static SaveVMHandlers savevm_ram_handlers = {
>      .save_live_complete_precopy = ram_save_complete,
>      .save_live_pending = ram_save_pending,
>      .load_state = ram_load,
> -    .cleanup = ram_migration_cleanup,
> +    .save_cleanup = ram_migration_cleanup,
>  };
>  
>  void ram_mig_init(void)
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 7f2a5bd..fb93931 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -1226,8 +1226,8 @@ void qemu_savevm_state_cleanup(void)
>  
>      trace_savevm_state_cleanup();
>      QTAILQ_FOREACH(se, &savevm_state.handlers, entry) {
> -        if (se->ops && se->ops->cleanup) {
> -            se->ops->cleanup(se->opaque);
> +        if (se->ops && se->ops->save_cleanup) {
> +            se->ops->save_cleanup(se->opaque);
>          }
>      }
>  }
> -- 
> 2.9.4
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2017-06-16 17:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-13  9:53 [Qemu-devel] [PATCH v2 0/5] Create setup/cleanup methods for migration incoming side Juan Quintela
2017-06-13  9:53 ` [Qemu-devel] [PATCH v2 1/5] migration: Rename save_live_setup() to save_setup() Juan Quintela
2017-06-16 17:30   ` Dr. David Alan Gilbert
2017-06-13  9:53 ` [Qemu-devel] [PATCH v2 2/5] migration: Rename cleanup() to save_cleanup() Juan Quintela
2017-06-16 17:33   ` Dr. David Alan Gilbert [this message]
2017-06-13  9:53 ` [Qemu-devel] [PATCH v2 3/5] migration: Create load_setup()/cleanup() methods Juan Quintela
2017-06-16 17:54   ` Dr. David Alan Gilbert
2017-06-13  9:53 ` [Qemu-devel] [PATCH v2 4/5] migration: Convert ram to use new load_setup()/load_cleanup() Juan Quintela
2017-06-16 18:00   ` Dr. David Alan Gilbert
2017-06-21 11:33     ` Juan Quintela
2017-06-13  9:53 ` [Qemu-devel] [PATCH v2 5/5] migration: Make compression_threads use save/load_setup/cleanup() Juan Quintela
2017-06-16 18:04   ` Dr. David Alan Gilbert

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=20170616173315.GC19805@work-vm \
    --to=dgilbert@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@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).