Juan Quintela <quint...@redhat.com> writes: > Markus Armbruster <arm...@redhat.com> wrote: >> Juan Quintela <quint...@redhat.com> writes: >> >>> We have change in the previous patch to use migration capabilities for >>> it. Notice that we continue using the old command line flags from >>> migrate command from the time being. Remove the set_params method as >>> now it is empty. >>> >>> Signed-off-by: Juan Quintela <quint...@redhat.com> > >>> diff --git a/migration/savevm.c b/migration/savevm.c >>> index b4f736f..5fc10ab 100644 >>> --- a/migration/savevm.c >>> +++ b/migration/savevm.c >>> @@ -1233,8 +1233,6 @@ static int qemu_savevm_state(QEMUFile *f, Error >>> **errp) >>> { >>> int ret; >>> MigrationParams params = { >>> - .blk = 0, >>> - .shared = 0 >>> }; >>> MigrationState *ms = migrate_init(¶ms); >>> MigrationStatus status; >>> @@ -1245,6 +1243,12 @@ static int qemu_savevm_state(QEMUFile *f, Error >>> **errp) >>> goto done; >>> } >>> >>> + if (migrate_use_block()) { >>> + error_setg(errp, "Block migration and snapshots are incompatible"); >>> + ret = -EINVAL; >>> + goto done; >>> + } >>> + >>> qemu_mutex_unlock_iothread(); >>> qemu_savevm_state_header(f); >>> qemu_savevm_state_begin(f, ¶ms); >> >> New error that isn't mentioned in the commit message. Does it belong >> here? > > It is the equivalent of the previous chunk. > > If you do a savevm, you can't do a: > > savevm -b/-i foo > > but now you can do: > > migrate_set_capability block on > savevm foo > > And we can't use block migration. If you preffer, I can disable the > feature unconditionally, but I am not sure that it is much better.
I see. Add your explanation to the commit message, and I'm happy.