Juan Quintela <quint...@redhat.com> wrote: > It is really size_t. Everything else uses uint64_t, so move this to > uint64_t as well. A size can't be negative anyways. > > Signed-off-by: Juan Quintela <quint...@redhat.com>
Self-nack. > - qemu_file_set_rate_limit(ms->to_dst_file, INT64_MAX); > + qemu_file_set_rate_limit(ms->to_dst_file, UINT64_MAX); 1st: this should be zero. > } else { > qemu_file_set_rate_limit(ms->to_dst_file, bandwidth / > XFER_LIMIT_RATIO); > } > @@ -2301,7 +2301,7 @@ static void migration_completion(MigrationState *s) > } > if (ret >= 0) { > s->block_inactive = !migrate_colo(); > - qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX); > + qemu_file_set_rate_limit(s->to_dst_file, UINT64_MAX); Same here > ret = qemu_savevm_state_complete_precopy(s->to_dst_file, > false, > s->block_inactive); > } > @@ -3049,7 +3049,7 @@ static void *bg_migration_thread(void *opaque) > rcu_register_thread(); > object_ref(OBJECT(s)); > > - qemu_file_set_rate_limit(s->to_dst_file, INT64_MAX); > + qemu_file_set_rate_limit(s->to_dst_file, UINT64_MAX); And here. > @@ -748,18 +748,18 @@ int qemu_file_rate_limit(QEMUFile *f) > if (qemu_file_get_error(f)) { > return 1; > } > - if (f->rate_limit_max > 0 && f->rate_limit_used > f->rate_limit_max) { > + if (f->rate_limit_used > f->rate_limit_max) { And this is wrong. f->rate_limit_max == 0 means that we don't do rate_limit. Will resend this one later. Sorry, Juan. PD. No, I have no clue how I have had this patch applied the whole day and no failures and now I get failures in migration-test. The number of times that I run this test on the last two days have been in the hundreds.