All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com, dgilbert@redhat.com,
	peterx@redhat.com
Subject: Re: [Qemu-devel] [PATCH 2/5] migration: Create block capability
Date: Fri, 19 May 2017 11:20:16 +0200	[thread overview]
Message-ID: <87efvlcien.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170518111837.29212-3-quintela@redhat.com> (Juan Quintela's message of "Thu, 18 May 2017 13:18:34 +0200")

Juan Quintela <quintela@redhat.com> writes:

> Create one capability for block migration and one parameter for
> incremental block migration.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
[...]
> diff --git a/include/migration/block.h b/include/migration/block.h
> index 41a1ac8..5225af9 100644
> --- a/include/migration/block.h
> +++ b/include/migration/block.h
> @@ -20,4 +20,6 @@ uint64_t blk_mig_bytes_transferred(void);
>  uint64_t blk_mig_bytes_remaining(void);
>  uint64_t blk_mig_bytes_total(void);
>  
> +void migrate_set_block_enabled(bool value, Error **errp);
> +
>  #endif /* MIGRATION_BLOCK_H */
> diff --git a/include/migration/migration.h b/include/migration/migration.h
> index 49ec501..024a048 100644
> --- a/include/migration/migration.h
> +++ b/include/migration/migration.h
> @@ -153,6 +153,9 @@ struct MigrationState
>  
>      /* The last error that occurred */
>      Error *error;
> +    /* Do we have to clean up -b/-i from old migrate parameters */

The sentence is a question, so it should end with a '?'.

> +    /* This feature is deprecated and will be removed */
> +    bool must_remove_block_options;
>  };
>  
>  void migrate_set_state(int *state, int old_state, int new_state);
> @@ -265,6 +268,9 @@ bool migrate_colo_enabled(void);
>  
>  int64_t xbzrle_cache_resize(int64_t new_size);
>  
> +bool migrate_use_block(void);
> +bool migrate_use_block_incremental(void);
> +
>  bool migrate_use_compression(void);
>  int migrate_compress_level(void);
>  int migrate_compress_threads(void);
> diff --git a/migration/migration.c b/migration/migration.c
> index 0304c01..c13c0a2 100644
> --- a/migration/migration.c
> +++ b/migration/migration.c
[...]
> @@ -1207,6 +1242,24 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
>          return;
>      }
>  
> +    if ((has_blk && blk) || (has_inc && inc)) {
> +        if (migrate_use_block() || migrate_use_block_incremental()) {
> +            error_setg(errp, "Command options are incompatible with "
> +                       "current migration capabilities");
> +            return;
> +        }
> +        migrate_set_block_enabled(true, &local_err);
> +        if (local_err) {
> +            error_propagate(errp, local_err);
> +            return;
> +        }
> +        s->must_remove_block_options = true;
> +    }
> +
> +    if (has_inc && inc) {
> +        migrate_set_block_incremental(s, true);
> +    }
> +

Putting this within the previous conditional might be clearer.  Your
choice.

>      s = migrate_init(&params);
>  
>      if (strstart(uri, "tcp:", &p)) {
[...]

Only nitpicks, so
Reviewed-by: Markus Armbruster <armbru@redhat.com>

  parent reply	other threads:[~2017-05-19  9:20 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 11:18 [Qemu-devel] [PATCH 0/5] Remove old MigrationParams Juan Quintela
2017-05-18 11:18 ` [Qemu-devel] [PATCH 1/5] hmp: Use visitor api for hmp_migrate_set_parameter() Juan Quintela
2017-05-18 11:18 ` [Qemu-devel] [PATCH 2/5] migration: Create block capability Juan Quintela
2017-05-18 14:49   ` Eric Blake
2017-05-19  9:20   ` Markus Armbruster [this message]
2017-05-18 11:18 ` [Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams Juan Quintela
2017-05-19 10:54   ` Markus Armbruster
2017-05-24 12:48     ` Markus Armbruster
2017-05-18 11:18 ` [Qemu-devel] [PATCH 4/5] migration: Remove " Juan Quintela
2017-05-18 11:18 ` [Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable Juan Quintela
2017-05-18 12:19   ` Dr. David Alan Gilbert
2017-05-18 13:08     ` Juan Quintela
2017-05-18 14:50   ` Eric Blake
2017-05-18 12:15 ` [Qemu-devel] [PATCH 0/5] Remove old MigrationParams Dr. David Alan Gilbert
2017-05-18 13:10   ` Juan Quintela
  -- strict thread matches above, loose matches on Subject: below --
2017-05-17 15:38 [Qemu-devel] [PATCH v5 " Juan Quintela
2017-05-17 15:38 ` [Qemu-devel] [PATCH 2/5] migration: Create block capability Juan Quintela
2017-05-17 15:52   ` Eric Blake
2017-05-17 17:02     ` Juan Quintela
2017-05-16 11:11 [Qemu-devel] [PATCH v4 0/5] Remove old MigrationParams Juan Quintela
2017-05-16 11:11 ` [Qemu-devel] [PATCH 2/5] migration: Create block capability Juan Quintela
2017-05-16 14:20   ` Markus Armbruster
2017-05-16 14:34     ` Juan Quintela
2017-05-16 16:00       ` Markus Armbruster
2017-05-16 16:08         ` Eric Blake
2017-05-16 16:42           ` Markus Armbruster
2017-05-16 16:48             ` Eric Blake
2017-05-16 17:07               ` Markus Armbruster
2017-05-16 17:37               ` Juan Quintela

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=87efvlcien.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=lvivier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.