diff options
author | Stefan Hajnoczi | 2011-11-14 13:44:23 +0100 |
---|---|---|
committer | Kevin Wolf | 2011-12-05 14:51:37 +0100 |
commit | e850b35a1f41304c31b971bde95f0534f2afd791 (patch) | |
tree | 69f60a28fd4581bf255e3ef82754bd034c9e0665 /block/vdi.c | |
parent | vvfat: convert to .bdrv_co_is_allocated() (diff) | |
download | qemu-e850b35a1f41304c31b971bde95f0534f2afd791.tar.gz qemu-e850b35a1f41304c31b971bde95f0534f2afd791.tar.xz qemu-e850b35a1f41304c31b971bde95f0534f2afd791.zip |
vdi: convert to .bdrv_co_is_allocated()
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 <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/vdi.c')
-rw-r--r-- | block/vdi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/vdi.c b/block/vdi.c index 02da6b44d0..e1d8cffc2d 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -472,8 +472,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; @@ -996,7 +996,7 @@ static BlockDriver bdrv_vdi = { .bdrv_close = vdi_close, .bdrv_create = vdi_create, .bdrv_co_flush_to_disk = 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, |