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>
This commit is contained in:
		
							parent
							
								
									517a13c91a
								
							
						
					
					
						commit
						aac844ed97
					
				
							
								
								
									
										3
									
								
								savevm.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								savevm.c
									
									
									
									
									
								
							@ -1626,6 +1626,9 @@ int qemu_savevm_state_iterate(QEMUFile *f)
 | 
				
			|||||||
        if (se->save_live_state == NULL)
 | 
					        if (se->save_live_state == NULL)
 | 
				
			||||||
            continue;
 | 
					            continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        if (qemu_file_rate_limit(f)) {
 | 
				
			||||||
 | 
					            return 0;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        trace_savevm_section_start();
 | 
					        trace_savevm_section_start();
 | 
				
			||||||
        /* Section type */
 | 
					        /* Section type */
 | 
				
			||||||
        qemu_put_byte(f, QEMU_VM_SECTION_PART);
 | 
					        qemu_put_byte(f, QEMU_VM_SECTION_PART);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user