From aac844ed97c39b8c0fb16d7bf9851fdedf325be3 Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 22 May 2012 00:38:26 +0200 Subject: 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 --- savevm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'savevm.c') 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); -- cgit v1.1