diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-11-22 13:39:49 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-03 15:26:49 +0100 |
commit | 97b00e285119e611f500686f32f9bccffbb9126a (patch) | |
tree | 4ac92b13038004b54d223ce74652603ff8500ee4 /block/vhdx.c | |
parent | b8d71c09f31a9cae248d167dddc75c66d5135ff2 (diff) | |
download | qemu-97b00e285119e611f500686f32f9bccffbb9126a.zip qemu-97b00e285119e611f500686f32f9bccffbb9126a.tar.gz qemu-97b00e285119e611f500686f32f9bccffbb9126a.tar.bz2 |
vpc, vhdx: add get_info
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/vhdx.c')
-rw-r--r-- | block/vhdx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/block/vhdx.c b/block/vhdx.c index 7d1af96..ed6fa53 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1043,6 +1043,15 @@ static void vhdx_block_translate(BDRVVHDXState *s, int64_t sector_num, } +static int vhdx_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) +{ + BDRVVHDXState *s = bs->opaque; + + bdi->cluster_size = s->block_size; + + return 0; +} + static coroutine_fn int vhdx_co_readv(BlockDriverState *bs, int64_t sector_num, int nb_sectors, QEMUIOVector *qiov) @@ -1885,6 +1894,7 @@ static BlockDriver bdrv_vhdx = { .bdrv_co_readv = vhdx_co_readv, .bdrv_co_writev = vhdx_co_writev, .bdrv_create = vhdx_create, + .bdrv_get_info = vhdx_get_info, .create_options = vhdx_create_options, }; |