qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] block migration: Allow compile time disable


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] block migration: Allow compile time disable
Date: Mon, 15 May 2017 09:59:40 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0

On 05/15/2017 09:05 AM, Dr. David Alan Gilbert (git) wrote:
> From: "Dr. David Alan Gilbert" <address@hidden>
> 
> Many users now prefer to use drive_mirror over NBD as an
> alternative to the older migrate -b option; drive_mirror is
> more complex to setup but gives you more options (e.g. only
> migrating some of the disks if some of them are shared).
> 
> Allow the large chunk of block migration code to be compiled
> out for those who don't use it.
> 
> Based on a downstream-patch we've had for a while by Jeff Cody.
> 
> Signed-off-by: Dr. David Alan Gilbert <address@hidden>
> ---
>  configure                 | 11 +++++++++++
>  include/migration/block.h | 23 +++++++++++++++++++++++
>  migration/Makefile.objs   |  2 +-
>  migration/migration.c     |  9 +++++++++
>  4 files changed, 44 insertions(+), 1 deletion(-)
> 

> @@ -1400,6 +1405,7 @@ disabled with --disable-FEATURE, default is enabled if 
> available:
>    libnfs          nfs support
>    smartcard       smartcard support (libcacard)
>    libusb          libusb (for usb passthrough)
> +  live-block-migration   Block migration in the main migration stream

Bummer that the long name breaks alignment. But I don't have any
bikeshed paint handy to suggest a shorter name.

> +++ b/migration/migration.c
> @@ -1213,6 +1213,15 @@ void qmp_migrate(const char *uri, bool has_blk, bool 
> blk,
>      params.blk = has_blk && blk;
>      params.shared = has_inc && inc;
>  
> +#ifndef CONFIG_LIVE_BLOCK_MIGRATION
> +    if (params.blk || params.shared) {
> +        error_setg(errp, "QEMU compiled without old-style (blk/-b, inc/-i) "
> +                         "block migration");
> +        error_append_hint(errp, "Use drive_mirror+NBD instead.\n");
> +        return;
> +    }
> +#endif

Juan's pending series to simplify the representation of -b/-i may also
play a role here, particularly if we want to bite the bullet and change
the QMP command to drop the optional parameters altogether.

It may be worth documenting in the .json file (independently of whether
the configure option is used) that blk/inc are deprecated, and may be
removed in a future release, if we want to start the clock on removing them.

Reviewed-by: Eric Blake <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]