aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-11-22 13:39:46 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-03 15:26:49 +0100
commitd5ef94d43da8c57a2d597efbdec3d9a54d97fdf7 (patch)
treeddc6f1f341bb4f517ebbc275386e20a1407721b8 /block.c
parent94d6ff21f48c8c98e6e9eef58cc6f6346c9dd851 (diff)
downloadqemu-d5ef94d43da8c57a2d597efbdec3d9a54d97fdf7.zip
qemu-d5ef94d43da8c57a2d597efbdec3d9a54d97fdf7.tar.gz
qemu-d5ef94d43da8c57a2d597efbdec3d9a54d97fdf7.tar.bz2
block: add bdrv_aio_write_zeroes
This will be used by the SCSI layer. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/block.c b/block.c
index 1d9da53..c491edf 100644
--- a/block.c
+++ b/block.c
@@ -3684,6 +3684,17 @@ BlockDriverAIOCB *bdrv_aio_writev(BlockDriverState *bs, int64_t sector_num,
cb, opaque, true);
}
+BlockDriverAIOCB *bdrv_aio_write_zeroes(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors, BdrvRequestFlags flags,
+ BlockDriverCompletionFunc *cb, void *opaque)
+{
+ trace_bdrv_aio_write_zeroes(bs, sector_num, nb_sectors, flags, opaque);
+
+ return bdrv_co_aio_rw_vector(bs, sector_num, NULL, nb_sectors,
+ BDRV_REQ_ZERO_WRITE | flags,
+ cb, opaque, true);
+}
+
typedef struct MultiwriteCB {
int error;