From 2b0ce0797d6bfb13ebefe010da86abced0b7a9b3 Mon Sep 17 00:00:00 2001 From: "Michael R. Hines" Date: Tue, 25 Jun 2013 21:35:28 -0400 Subject: 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 Tested-by: Chegu Vinod Tested-by: Michael R. Hines Signed-off-by: Michael R. Hines Signed-off-by: Juan Quintela --- savevm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'savevm.c') diff --git a/savevm.c b/savevm.c index 48cc2a995f..9b5577ef6c 100644 --- a/savevm.c +++ b/savevm.c @@ -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 -- cgit v1.2.1