aboutsummaryrefslogtreecommitdiff
path: root/buffered_file.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2012-07-20 13:33:53 +0200
committerJuan Quintela <quintela@redhat.com>2012-10-17 18:34:59 +0200
commit796b4b0f5011e30cffbc57ed5a4ab93c6f5eaab7 (patch)
treebd353edd96463d89a8040fe5b4aa0d07b5a68f5e /buffered_file.c
parent11c7674129a81b5b69e00ad252a63186e15bf6b6 (diff)
buffered_file: We can access directly to bandwidth_limit
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'buffered_file.c')
-rw-r--r--buffered_file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/buffered_file.c b/buffered_file.c
index 4fca774dd8..43e68b6515 100644
--- a/buffered_file.c
+++ b/buffered_file.c
@@ -222,15 +222,14 @@ static void buffered_rate_tick(void *opaque)
buffered_put_buffer(s, NULL, 0, 0);
}
-QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state,
- size_t bytes_per_sec)
+QEMUFile *qemu_fopen_ops_buffered(MigrationState *migration_state)
{
QEMUFileBuffered *s;
s = g_malloc0(sizeof(*s));
s->migration_state = migration_state;
- s->xfer_limit = bytes_per_sec / 10;
+ s->xfer_limit = migration_state->bandwidth_limit / 10;
s->file = qemu_fopen_ops(s, buffered_put_buffer, NULL,
buffered_close, buffered_rate_limit,