[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 17/31] vmdk: Convert to bdrv_co_pwrite_zeroes()
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 17/31] vmdk: Convert to bdrv_co_pwrite_zeroes() |
Date: |
Wed, 8 Jun 2016 11:16:43 +0200 |
From: Eric Blake <address@hidden>
Another step on our continuing quest to switch to byte-based
interfaces.
Signed-off-by: Eric Blake <address@hidden>
Reviewed-by: Kevin Wolf <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vmdk.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 5a01e16..ee09423 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1703,15 +1703,13 @@ static int vmdk_write_compressed(BlockDriverState *bs,
}
}
-static int coroutine_fn vmdk_co_write_zeroes(BlockDriverState *bs,
- int64_t sector_num,
- int nb_sectors,
- BdrvRequestFlags flags)
+static int coroutine_fn vmdk_co_pwrite_zeroes(BlockDriverState *bs,
+ int64_t offset,
+ int bytes,
+ BdrvRequestFlags flags)
{
int ret;
BDRVVmdkState *s = bs->opaque;
- uint64_t offset = sector_num * BDRV_SECTOR_SIZE;
- uint64_t bytes = nb_sectors * BDRV_SECTOR_SIZE;
qemu_co_mutex_lock(&s->lock);
/* write zeroes could fail if sectors not aligned to cluster, test it with
@@ -2402,7 +2400,7 @@ static BlockDriver bdrv_vmdk = {
.bdrv_co_preadv = vmdk_co_preadv,
.bdrv_co_pwritev = vmdk_co_pwritev,
.bdrv_write_compressed = vmdk_write_compressed,
- .bdrv_co_write_zeroes = vmdk_co_write_zeroes,
+ .bdrv_co_pwrite_zeroes = vmdk_co_pwrite_zeroes,
.bdrv_close = vmdk_close,
.bdrv_create = vmdk_create,
.bdrv_co_flush_to_disk = vmdk_co_flush,
--
1.8.3.1
- [Qemu-devel] [PULL 00/31] Block layer patches, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 06/31] iscsi: Use block size as minimum zero/discard alignment, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 02/31] qcow2: simplify logic in qcow2_co_write_zeroes, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 07/31] block: Track write zero limits in bytes, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 08/31] block: Add .bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 01/31] block: split write_zeroes always, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 03/31] qcow2: add tracepoints for qcow2_co_write_zeroes, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 10/31] iscsi: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 11/31] qcow2: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 05/31] qcow2: Catch more unaligned write_zero into zero cluster, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 17/31] vmdk: Convert to bdrv_co_pwrite_zeroes(),
Kevin Wolf <=
- [Qemu-devel] [PULL 19/31] migration/block: Convert load to BlockBackend, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 09/31] block: Switch bdrv_write_zeroes() to byte interface, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 21/31] block: assert that bs->request_alignment is a power of 2, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 15/31] raw-posix: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 18/31] block: Kill bdrv_co_write_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 04/31] qemu-iotests: Test one more spot for optimizing write_zeroes, Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 13/31] gluster: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 12/31] blkreplay: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 16/31] raw_bsd: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08
- [Qemu-devel] [PULL 14/31] qed: Convert to bdrv_co_pwrite_zeroes(), Kevin Wolf, 2016/06/08