[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/12] migration/qemu-file: remove check on writev_bu
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[Qemu-devel] [PULL 10/12] migration/qemu-file: remove check on writev_buffer in qemu_put_compression_data |
Date: |
Thu, 12 Sep 2019 14:50:04 +0100 |
From: Wei Yang <address@hidden>
The check of writev_buffer is in qemu_fflush, which means it is not
harmful if it is NULL.
And removing it will make the code consistent since all other
add_to_iovec() is called without the check.
Signed-off-by: Wei Yang <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
migration/qemu-file.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 075faf03c3..66627088d4 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -760,9 +760,7 @@ ssize_t qemu_put_compression_data(QEMUFile *f, z_stream
*stream,
}
qemu_put_be32(f, blen);
- if (f->ops->writev_buffer) {
- add_to_iovec(f, f->buf + f->buf_index, blen, false);
- }
+ add_to_iovec(f, f->buf + f->buf_index, blen, false);
f->buf_index += blen;
if (f->buf_index == IO_BUF_SIZE) {
qemu_fflush(f);
--
2.21.0
- [Qemu-devel] [PULL 00/12] migration queue, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 02/12] migration: cleanup check on ops in savevm.handlers iterations, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 01/12] migration: multifd_send_thread always post p->sem_sync when error happen, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 03/12] hw/net/vmxnet3: Fix leftover unregister_savevm, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 04/12] migration: register_savevm_live doesn't need dev, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 05/12] qemu-file: Rework old qemu_fflush comment, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 06/12] migration: Add validate-uuid capability, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 07/12] tests/libqtest: Allow setting expected exit status, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 09/12] migration: Fix postcopy bw for recovery, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 08/12] tests/migration: Add a test for validate-uuid capability, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 10/12] migration/qemu-file: remove check on writev_buffer in qemu_put_compression_data,
Dr. David Alan Gilbert (git) <=
- [Qemu-devel] [PULL 11/12] migration/qemu-file: fix potential buf waste for extra buf_index adjustment, Dr. David Alan Gilbert (git), 2019/09/12
- [Qemu-devel] [PULL 12/12] migration: fix one typo in comment of function migration_total_bytes(), Dr. David Alan Gilbert (git), 2019/09/12
- Re: [Qemu-devel] [PULL 00/12] migration queue, Peter Maydell, 2019/09/13