From: Juan Quintela Date: Mon, 21 May 2012 22:38:26 +0000 (+0200) Subject: No need to iterate if we already are over the limit X-Git-Tag: v2.7.1~4850^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=aac844ed97c39b8c0fb16d7bf9851fdedf325be3;p=mirror_qemu.git No need to iterate if we already are over the limit If buffers are full, don't iterate, just exit. Signed-off-by: Juan Quintela --- diff --git a/savevm.c b/savevm.c index 987c6c0cd0..a15c163b6e 100644 --- a/savevm.c +++ b/savevm.c @@ -1626,6 +1626,9 @@ int qemu_savevm_state_iterate(QEMUFile *f) if (se->save_live_state == NULL) continue; + if (qemu_file_rate_limit(f)) { + return 0; + } trace_savevm_section_start(); /* Section type */ qemu_put_byte(f, QEMU_VM_SECTION_PART);