diff options
author | Peter Lieven <pl@kamp.de> | 2013-10-24 12:06:54 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-11-28 10:30:51 +0100 |
commit | 4ce786914b745a144a9eda1ea33f3ff98328c527 (patch) | |
tree | 2c20f0622ce18189318f265ab2224f7732b692fa /include | |
parent | e1a5c4bed44bc23f69f53883c657e31e150cab30 (diff) | |
download | qemu-4ce786914b745a144a9eda1ea33f3ff98328c527.zip |
block: add wrappers for logical block provisioning information
This adds 2 wrappers to read the unallocated_blocks_are_zero and
can_write_zeroes_with_unmap info from the BDI. The wrappers are
required to check for the existence of a backing_hd and
if the devices are opened with the correct flags.
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Peter Lieven <pl@kamp.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/block/block.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h index 9c76967104..803c5caceb 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -344,6 +344,8 @@ int bdrv_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors); int bdrv_co_discard(BlockDriverState *bs, int64_t sector_num, int nb_sectors); int bdrv_has_zero_init_1(BlockDriverState *bs); int bdrv_has_zero_init(BlockDriverState *bs); +bool bdrv_unallocated_blocks_are_zero(BlockDriverState *bs); +bool bdrv_can_write_zeroes_with_unmap(BlockDriverState *bs); int64_t bdrv_get_block_status(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int *pnum); int bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, |