Re: [Qemu-devel] [PATCH V2 2/2] migration/qemu-file: fix potential buf waste for extra buf_index adjustment

2019-09-11 Thread Dr. David Alan Gilbert
* Wei Yang (richard.weiy...@gmail.com) wrote: > From: Wei Yang > > In add_to_iovec(), qemu_fflush() will be called if iovec is full. If > this happens, buf_index is reset. Currently, this is not checked and > buf_index would always been adjust with buf size. > > This is not harmful, but will was

[Qemu-devel] [PATCH V2 2/2] migration/qemu-file: fix potential buf waste for extra buf_index adjustment

2019-09-11 Thread Wei Yang
From: Wei Yang In add_to_iovec(), qemu_fflush() will be called if iovec is full. If this happens, buf_index is reset. Currently, this is not checked and buf_index would always been adjust with buf size. This is not harmful, but will waste some space in file buffer. This patch make add_to_iovec(