]> Git Repo - qemu.git/commit
scsi-disk: Fix assertion failure on WRITE SAME
authorFam Zheng <[email protected]>
Wed, 29 Jul 2015 08:45:11 +0000 (16:45 +0800)
committerPaolo Bonzini <[email protected]>
Thu, 30 Jul 2015 13:44:09 +0000 (15:44 +0200)
commita56537a12757a8cdee24ad8c83e5af7a9833ea70
treee08d4d80e70d8624e36ffaa69aa0b91b32415ee6
parent4bb7b0daf8ea34bcc582642d35a2e4902f7841db
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: [email protected]
Signed-off-by: Fam Zheng <[email protected]>
Message-Id: <1438159512[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
hw/scsi/scsi-disk.c
This page took 0.025412 seconds and 4 git commands to generate.