scsi-disk: Fix assertion failure on WRITE SAME
The last portion of an unaligned WRITE SAME command could fail the assertion in bdrv_aligned_pwritev: assert(!qiov || bytes == qiov->size); Because we updated data->iov.iov_len right above this if block, but data->qiov still has the old size. Reinitialize the qiov to make them equal and keep block layer happy. Cc: qemu-stable@nongnu.org Signed-off-by: NFam Zheng <famz@redhat.com> Message-Id: <1438159512-3871-2-git-send-email-famz@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> (cherry picked from commit a56537a1) Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
Showing
想要评论请 注册 或 登录