qemu-patch-raspberry4/migration
Alexander Graf 9722140011 qemu-file: Add fast ftell code path
For ftell we flush the output buffer to ensure that we don't have anything
lingering in our internal buffers. This is a very safe thing to do.

However, with the dynamic size measurement that the dynamic vmstate
description will bring this would turn out quite slow.

Instead, we can fast path this specific measurement and just take the
internal buffers into account when telling the kernel our position.

I'm sure I overlooked some corner cases where this doesn't work, so
instead of tuning the safe, existing version, this patch adds a fast
variant of ftell that gets used by the dynamic vmstate description code
which isn't critical when it fails.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-02-05 17:16:14 +01:00
..
block.c migration/block: fix pending() return value 2015-01-13 11:47:56 +00:00
exec.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
fd.c Handle bi-directional communication for fd migration 2015-01-16 13:06:17 +05:30
Makefile.objs Split the QEMU buffered file code out 2014-12-16 17:47:36 +05:30
migration.c migration_cancel: shutdown migration socket 2015-01-16 13:06:17 +05:30
qemu-file-buf.c QEMUSizedBuffer: only free qsb that qemu_bufopen allocated 2015-01-16 13:06:17 +05:30
qemu-file-internal.h Split struct QEMUFile out 2014-12-16 17:47:36 +05:30
qemu-file-stdio.c Start migrating migration code into a migration directory 2014-12-16 17:47:36 +05:30
qemu-file-unix.c socket shutdown 2015-01-16 13:06:17 +05:30
qemu-file.c qemu-file: Add fast ftell code path 2015-02-05 17:16:14 +01:00
rdma.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
tcp.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
unix.c Remove migration- pre/post fixes off files in migration/ dir 2014-12-16 17:47:36 +05:30
vmstate.c Migration: Add lots of trace events 2015-02-05 17:16:14 +01:00
xbzrle.c Start migrating migration code into a migration directory 2014-12-16 17:47:36 +05:30