diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-11-22 13:39:50 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-03 15:26:49 +0100 |
commit | 95de6d7078b029b73708059a17cef20f332adcb7 (patch) | |
tree | ddb611353feed44e3458c5dbe1eea53ea2b3cc10 /block/qcow2.c | |
parent | 97b00e285119e611f500686f32f9bccffbb9126a (diff) |
block drivers: add discard/write_zeroes properties to bdrv_get_info implementation
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/qcow2.c')
-rw-r--r-- | block/qcow2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 8e2b6c7548..41e454a2f1 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1893,6 +1893,8 @@ static coroutine_fn int qcow2_co_flush_to_os(BlockDriverState *bs) static int qcow2_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) { BDRVQcowState *s = bs->opaque; + bdi->unallocated_blocks_are_zero = true; + bdi->can_write_zeroes_with_unmap = (s->qcow_version >= 3); bdi->cluster_size = s->cluster_size; bdi->vm_state_offset = qcow2_vm_state_offset(s); return 0; |