On Mon, Jun 12, 2023 at 09:33:43PM +0200, Juan Quintela wrote: > It is obsolete. It is better to use driver_mirror+NBD instead. > > CC: Kevin Wolf <kwolf@xxxxxxxxxx> > CC: Eric Blake <eblake@xxxxxxxxxx> > CC: Stefan Hajnoczi <stefanha@xxxxxxxxxx> > CC: Hanna Czenczek <hreitz@xxxxxxxxxx> > > Signed-off-by: Juan Quintela <quintela@xxxxxxxxxx> > > --- > > Can any of you give one example of how to use driver_mirror+NBD for > deprecated.rst? Please see "QMP invocation for live storage migration with ``drive-mirror`` + NBD" in docs/interop/live-block-operations.rst for a detailed explanation. > > Thanks, Juan. > --- > docs/about/deprecated.rst | 6 ++++++ > qapi/migration.json | 29 +++++++++++++++++++++++++---- > migration/block.c | 2 ++ > migration/options.c | 7 +++++++ > 4 files changed, 40 insertions(+), 4 deletions(-) > > diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst > index 518672722d..173c5ba5cb 100644 > --- a/docs/about/deprecated.rst > +++ b/docs/about/deprecated.rst > @@ -454,3 +454,9 @@ Everything except ``-incoming defer`` are deprecated. This allows to > setup parameters before launching the proper migration with > ``migrate-incoming uri``. > > +block migration (since 8.1) > +''''''''''''''''''''''''''' > + > +Block migration is too inflexible. It needs to migrate all block > +devices or none. Use driver_mirror+NBD instead. blockdev-mirror with NBD > + > diff --git a/qapi/migration.json b/qapi/migration.json > index b71e00737e..a8497de48d 100644 > --- a/qapi/migration.json > +++ b/qapi/migration.json > @@ -258,11 +258,16 @@ > # blocked. Present and non-empty when migration is blocked. > # (since 6.0) > # > +# Features: > +# > +# @deprecated: @disk migration is deprecated. Use driver_mirror+NBD blockdev-mirror with NBD > +# instead. > +# > # Since: 0.14 > ## > { 'struct': 'MigrationInfo', > 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats', > - '*disk': 'MigrationStats', > + '*disk': { 'type': 'MigrationStats', 'features': ['deprecated'] }, > '*vfio': 'VfioStats', > '*xbzrle-cache': 'XBZRLECacheStats', > '*total-time': 'int', > @@ -497,6 +502,9 @@ > # > # Features: > # > +# @deprecated: @block migration is deprecated. Use driver_mirror+NBD blockdev-mirror with NBD > +# instead. > +# > # @unstable: Members @x-colo and @x-ignore-shared are experimental. > # > # Since: 1.2 > @@ -506,7 +514,8 @@ > 'compress', 'events', 'postcopy-ram', > { 'name': 'x-colo', 'features': [ 'unstable' ] }, > 'release-ram', > - 'block', 'return-path', 'pause-before-switchover', 'multifd', > + { 'name': 'block', 'features': [ 'deprecated' ] }, > + 'return-path', 'pause-before-switchover', 'multifd', > 'dirty-bitmaps', 'postcopy-blocktime', 'late-block-activate', > { 'name': 'x-ignore-shared', 'features': [ 'unstable' ] }, > 'validate-uuid', 'background-snapshot', > @@ -789,6 +798,9 @@ > # > # Features: > # > +# @deprecated: Member @block-incremental is obsolete. Use > +# driver_mirror+NBD instead. blockdev-mirror with NBD > +# > # @unstable: Member @x-checkpoint-delay is experimental. > # > # Since: 2.4 > @@ -803,7 +815,7 @@ > 'tls-creds', 'tls-hostname', 'tls-authz', 'max-bandwidth', > 'downtime-limit', > { 'name': 'x-checkpoint-delay', 'features': [ 'unstable' ] }, > - 'block-incremental', > + { 'name': 'block-incremental', 'features': [ 'deprecated' ] }, > 'multifd-channels', > 'xbzrle-cache-size', 'max-postcopy-bandwidth', > 'max-cpu-throttle', 'multifd-compression', > @@ -945,6 +957,9 @@ > # > # Features: > # > +# @deprecated: Member @block-incremental is obsolete. Use > +# driver_mirror+NBD instead. blockdev-mirror with NBD > +# > # @unstable: Member @x-checkpoint-delay is experimental. > # > # TODO: either fuse back into MigrationParameters, or make > @@ -972,7 +987,8 @@ > '*downtime-limit': 'uint64', > '*x-checkpoint-delay': { 'type': 'uint32', > 'features': [ 'unstable' ] }, > - '*block-incremental': 'bool', > + '*block-incremental': { 'type': 'bool', > + 'features': [ 'deprecated' ] }, > '*multifd-channels': 'uint8', > '*xbzrle-cache-size': 'size', > '*max-postcopy-bandwidth': 'size', > @@ -1137,6 +1153,9 @@ > # > # Features: > # > +# @deprecated: Member @block-incremental is obsolete. Use > +# driver_mirror+NBD instead. blockdev-mirror with NBD > +# > # @unstable: Member @x-checkpoint-delay is experimental. > # > # Since: 2.4 > @@ -1161,6 +1180,8 @@ > '*downtime-limit': 'uint64', > '*x-checkpoint-delay': { 'type': 'uint32', > 'features': [ 'unstable' ] }, > + '*block-incremental': { 'type': 'bool', > + 'features': [ 'deprecated' ] }, > '*block-incremental': 'bool', > '*multifd-channels': 'uint8', > '*xbzrle-cache-size': 'size', > diff --git a/migration/block.c b/migration/block.c > index b9580a6c7e..2521a22269 100644 > --- a/migration/block.c > +++ b/migration/block.c > @@ -722,6 +722,8 @@ static int block_save_setup(QEMUFile *f, void *opaque) > trace_migration_block_save("setup", block_mig_state.submitted, > block_mig_state.transferred); > > + warn_report("block migration is deprecated. Use mirror jobs instead."); blockdev-mirror with NBD > + > qemu_mutex_lock_iothread(); > ret = init_blk_migration(f); > if (ret < 0) { > diff --git a/migration/options.c b/migration/options.c > index b62ab30cd5..374dc0767e 100644 > --- a/migration/options.c > +++ b/migration/options.c > @@ -12,6 +12,7 @@ > */ > > #include "qemu/osdep.h" > +#include "qemu/error-report.h" > #include "exec/target_page.h" > #include "qapi/clone-visitor.h" > #include "qapi/error.h" > @@ -437,6 +438,10 @@ bool migrate_caps_check(bool *old_caps, bool *new_caps, Error **errp) > return false; > } > #endif > + if (new_caps[MIGRATION_CAPABILITY_BLOCK]) { > + warn_report("Block migration is deprecated. " > + "Use driver_mirror+NBD instead."); blockdev-mirror with NBD > + } > > #ifndef CONFIG_REPLICATION > if (new_caps[MIGRATION_CAPABILITY_X_COLO]) { > @@ -1257,6 +1262,8 @@ static void migrate_params_apply(MigrateSetParameters *params, Error **errp) > } > > if (params->has_block_incremental) { > + warn_report("Block migration is deprecated. " > + "Use driver_mirror+NBD instead."); blockdev-mirror with NBD > s->parameters.block_incremental = params->block_incremental; > } > if (params->has_multifd_channels) { > -- > 2.40.1 >
Attachment:
signature.asc
Description: PGP signature