aboutsummaryrefslogtreecommitdiff
path: root/savevm.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-05-22 00:38:26 +0200
committerJuan Quintela <quintela@redhat.com>2012-06-29 13:27:28 +0200
commitaac844ed97c39b8c0fb16d7bf9851fdedf325be3 (patch)
tree632229d7217f3211e0371463beaa26788d9175fe /savevm.c
parent517a13c91a975987b4c2850c08078bd3cef4dce7 (diff)
downloadqemu-aac844ed97c39b8c0fb16d7bf9851fdedf325be3.zip
qemu-aac844ed97c39b8c0fb16d7bf9851fdedf325be3.tar.gz
qemu-aac844ed97c39b8c0fb16d7bf9851fdedf325be3.tar.bz2
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 <quintela@redhat.com>
Diffstat (limited to 'savevm.c')
-rw-r--r--savevm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/savevm.c b/savevm.c
index 987c6c0..a15c163 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);