Re: [PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed

2019-02-19 Thread Colin Ian King
On 19/02/2019 16:35, Michael S. Tsirkin wrote: > On Tue, Feb 19, 2019 at 01:57:13PM +, Colin King wrote: >> From: Colin Ian King >> >> Currently the loop that calls log_write_hva on each iovec is never >> executed because of an incorrect error check on the return from the >> call to translate_

Re: [PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed

2019-02-19 Thread Michael S. Tsirkin
On Tue, Feb 19, 2019 at 01:57:13PM +, Colin King wrote: > From: Colin Ian King > > Currently the loop that calls log_write_hva on each iovec is never > executed because of an incorrect error check on the return from the > call to translate_desc. The check should be checking for a -ve error >

[PATCH][next] vhost: only return early if ret indicates an error or no iovecs have been processed

2019-02-19 Thread Colin King
From: Colin Ian King Currently the loop that calls log_write_hva on each iovec is never executed because of an incorrect error check on the return from the call to translate_desc. The check should be checking for a -ve error return and because it makes no sense to iterate over zero items, the ch