[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/10] vdi: convert to .bdrv_co_is_allocated()
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 07/10] vdi: convert to .bdrv_co_is_allocated() |
Date: |
Fri, 11 Nov 2011 16:47:19 +0000 |
It is trivial to switch from the synchronous .bdrv_is_allocated()
interface to .bdrv_co_is_allocated() since vdi_is_allocated() does not
block.
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
block/vdi.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/block/vdi.c b/block/vdi.c
index 523a640..1f2bc2c 100644
--- a/block/vdi.c
+++ b/block/vdi.c
@@ -463,8 +463,8 @@ static int vdi_open(BlockDriverState *bs, int flags)
return -1;
}
-static int vdi_is_allocated(BlockDriverState *bs, int64_t sector_num,
- int nb_sectors, int *pnum)
+static int coroutine_fn vdi_co_is_allocated(BlockDriverState *bs,
+ int64_t sector_num, int nb_sectors, int *pnum)
{
/* TODO: Check for too large sector_num (in bdrv_is_allocated or here). */
BDRVVdiState *s = (BDRVVdiState *)bs->opaque;
@@ -981,7 +981,7 @@ static BlockDriver bdrv_vdi = {
.bdrv_close = vdi_close,
.bdrv_create = vdi_create,
.bdrv_co_flush = vdi_co_flush,
- .bdrv_is_allocated = vdi_is_allocated,
+ .bdrv_co_is_allocated = vdi_co_is_allocated,
.bdrv_make_empty = vdi_make_empty,
.bdrv_aio_readv = vdi_aio_readv,
--
1.7.7.1
- Re: [Qemu-devel] [PATCH 02/10] block: add .bdrv_co_is_allocated(), (continued)
[Qemu-devel] [PATCH 05/10] vvfat: use public block layer interface, Stefan Hajnoczi, 2011/11/11
[Qemu-devel] [PATCH 08/10] cow: convert to .bdrv_co_is_allocated(), Stefan Hajnoczi, 2011/11/11
[Qemu-devel] [PATCH 06/10] vvfat: convert to .bdrv_co_is_allocated(), Stefan Hajnoczi, 2011/11/11
[Qemu-devel] [PATCH 09/10] block: drop .bdrv_is_allocated() interface, Stefan Hajnoczi, 2011/11/11
[Qemu-devel] [PATCH 04/10] block: convert qcow2, qcow2, and vmdk to .bdrv_co_is_allocated(), Stefan Hajnoczi, 2011/11/11
[Qemu-devel] [PATCH 07/10] vdi: convert to .bdrv_co_is_allocated(),
Stefan Hajnoczi <=
[Qemu-devel] [PATCH 10/10] block: add bdrv_co_is_allocated() interface, Stefan Hajnoczi, 2011/11/11