On Wed, Feb 21, 2024 at 04:23:07PM -0500, Steven Sistare wrote: > > How about postcopy? I know it's nonsense to enable postcopy for cpr.. but > > iiuc we don't yet forbid an user doing so. Maybe we should? > > How about this? > > ------------------------------------------- > @@ -3600,6 +3600,11 @@ void migrate_fd_connect(MigrationState *s, Error > *error_in) > return; > } > > + if (migrate_mode_is_cpr(s) && migrate_postcopy()) { > + error_setg(&local_err, "cannot mix postcopy and cpr"); > + goto fail; > + } > + > if (resume) { > /* This is a resumed migration */ > rate_limit = migrate_max_postcopy_bandwidth(); > ------------------------------------------------
migrate_fd_connect() will be a bit late, the error won't be able to be attached in the "migrate" request. Perhaps, migrate_prepare()? -- Peter Xu