]> git.proxmox.com Git - mirror_qemu.git/commit
block: Fix blk_aio_write_zeroes()
authorKevin Wolf <kwolf@redhat.com>
Wed, 13 Apr 2016 10:47:08 +0000 (12:47 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Apr 2016 15:22:11 +0000 (17:22 +0200)
commit7fa84cd8d4b5ce3939bc2498010f6640e855dbad
tree4619b5ab9a523c68a800576d5e996ced47b0b94f
parent5ceb77652e3bf03bbe4cbc580db8bd1ce7a3cd1f
block: Fix blk_aio_write_zeroes()

Commit 57d6a428 broke blk_aio_write_zeroes() because in some write
functions in the call path don't have an explicit length argument but
reuse qiov->size instead. Which is great, except that write_zeroes
doesn't have a qiov, which this commit interprets as 0 bytes.
Consequently, blk_aio_write_zeroes() didn't effectively do anything.

This patch introduces an explicit acb->bytes in BlkAioEmAIOCB and uses
that instead of acb->rwco.size.

The synchronous version of the function is okay because it does pass a
qiov (with the right size and a NULL pointer as its base).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block/block-backend.c
tests/qemu-iotests/033
tests/qemu-iotests/033.out