rdma: introduce qemu_update_position()

RDMA writes happen asynchronously, and thus the performance accounting
also needs to be able to occur asynchronously. This allows anybody
to call into savevm.c to update both f->pos as well as into arch_init.c
to update the acct_info structure with up-to-date values when
the RDMA transfer actually completes.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: Chegu Vinod <chegu_vinod@hp.com>
Tested-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Michael R. Hines <mrhines@us.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
Michael R. Hines 2013-06-25 21:35:28 -04:00 committed by Juan Quintela
parent f4abc9d621
commit 2b0ce0797d
4 changed files with 20 additions and 0 deletions

View file

@ -671,6 +671,11 @@ int qemu_get_fd(QEMUFile *f)
return -1;
}
void qemu_update_position(QEMUFile *f, size_t size)
{
f->pos += size;
}
/** Closes the file
*
* Returns negative error value if any error happened on previous operations or