diff options
author | Ivan Ren <ivanren@tencent.com> | 2019-07-30 13:33:34 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-08-14 17:33:14 +0100 |
commit | 5d7d2558631b4421826c60046c606584c58ab76c (patch) | |
tree | eb0c10e702f218e24ffd5906d702c019c591dc57 /migration/qemu-file.c | |
parent | 87f3bd8717cd88932de302e215f1da51bfb8051a (diff) |
migration: add qemu_file_update_transfer interface
Add qemu_file_update_transfer for just update bytes_xfer for speed
limitation. This will be used for further migration feature such as
multifd migration.
Signed-off-by: Ivan Ren <ivanren@tencent.com>
Reviewed-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <1564464816-21804-2-git-send-email-ivanren@tencent.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/qemu-file.c')
-rw-r--r-- | migration/qemu-file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c index c04a7a891b..e33c46764f 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -654,6 +654,11 @@ void qemu_file_reset_rate_limit(QEMUFile *f) f->bytes_xfer = 0; } +void qemu_file_update_transfer(QEMUFile *f, int64_t len) +{ + f->bytes_xfer += len; +} + void qemu_put_be16(QEMUFile *f, unsigned int v) { qemu_put_byte(f, v >> 8); |