On 05/15/2017 09:05 AM, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > 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 <dgilb...@redhat.com> > --- > 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 <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature