Commit Graph

7 Commits

Author SHA1 Message Date
Juan Quintela 796b4b0f50 buffered_file: We can access directly to bandwidth_limit
Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-17 18:34:59 +02:00
Juan Quintela 11c7674129 buffered_file: unfold migrate_fd_close
We only used it once, just remove the callback indirection.

Signed-off-by: Juan Quintela <quintela@redhat.com>
2012-10-17 18:34:59 +02:00
Juan Quintela 749f7909d9 buffered_file: unfold migrate_fd_wait_for_unfreeze
We only used it once, just remove the callback indirection.

Signed-off-by: Juan Quintela <quintela@redhat.com>
2012-10-17 18:34:59 +02:00
Juan Quintela 2c9adcb850 buffered_file: unfold migrate_fd_put_ready
We only use it once, just remove the callback indirection.

Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-17 18:34:58 +02:00
Juan Quintela c87b015bc7 buffered_file: unfold migrate_fd_put_buffer
We only used it once, just remove the callback indirection

Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-17 18:34:58 +02:00
Juan Quintela c7a8f0cdd2 buffered_file: opaque is MigrationState
It always have that type, just change it.
We will remove buffered file later on the migration thread series.

Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-17 18:34:58 +02:00
aliguori 39b65c2e31 Introduce a buffered file wrapper for QEMUFile
This patch introduces a buffered QEMUFile wrapper.  This allows QEMUFile's to be
rate limited.  It also makes it easier to implement a QEMUFile that is
asynchronous since the current QEMUFile API requires that all reads and writes
be synchronous.

The only real non-obvious part of the API is the "frozen" concept.  If the
backend returns EAGAIN, the QEMUFile is said to be "frozen".  This means no
additional output will be sent to the backend until the file is unfrozen.
qemu_file_put_notify can be used to unfreeze a frozen file.

A synchronous interface is also provided to wait for an unfreeze event.  This is
used during the final part of live migration when the VM is no longer running.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5475 c046a42c-6fe2-441c-8c8c-71466251a162
2008-10-13 03:10:22 +00:00