diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-09-04 19:00:28 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-09-06 15:25:09 +0200 |
commit | b6b8a33354a448ee421f57676c1a93a536a63269 (patch) | |
tree | 42500103c1b9a5afb4683b9047984b9064d39e33 /block/vdi.c | |
parent | 11212d8fa08a4e5bd56bb4f6877f9a4c0439a02b (diff) | |
download | qemu-b6b8a33354a448ee421f57676c1a93a536a63269.zip qemu-b6b8a33354a448ee421f57676c1a93a536a63269.tar.gz qemu-b6b8a33354a448ee421f57676c1a93a536a63269.tar.bz2 |
block: introduce bdrv_get_block_status API
For now, bdrv_get_block_status is just another name for bdrv_is_allocated.
The next patches will add more flags.
This also touches all block drivers with a mostly mechanical rename. The
sole exception is cow; because it calls cow_co_is_allocated from the read
code, we keep that function and make cow_co_get_block_status a wrapper.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vdi.c')
-rw-r--r-- | block/vdi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/vdi.c b/block/vdi.c index 8a91525..7ab2567 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -470,7 +470,7 @@ static int vdi_reopen_prepare(BDRVReopenState *state, return 0; } -static int coroutine_fn vdi_co_is_allocated(BlockDriverState *bs, +static int64_t coroutine_fn vdi_co_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum) { /* TODO: Check for too large sector_num (in bdrv_is_allocated or here). */ @@ -780,7 +780,7 @@ static BlockDriver bdrv_vdi = { .bdrv_reopen_prepare = vdi_reopen_prepare, .bdrv_create = vdi_create, .bdrv_has_zero_init = bdrv_has_zero_init_1, - .bdrv_co_is_allocated = vdi_co_is_allocated, + .bdrv_co_get_block_status = vdi_co_get_block_status, .bdrv_make_empty = vdi_make_empty, .bdrv_read = vdi_co_read, |