summaryrefslogtreecommitdiff
path: root/block/qed.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-11-22 13:39:50 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-03 15:26:49 +0100
commit95de6d7078b029b73708059a17cef20f332adcb7 (patch)
treeddb611353feed44e3458c5dbe1eea53ea2b3cc10 /block/qed.c
parent97b00e285119e611f500686f32f9bccffbb9126a (diff)
downloadqemu-95de6d7078b029b73708059a17cef20f332adcb7.tar.gz
qemu-95de6d7078b029b73708059a17cef20f332adcb7.tar.bz2
qemu-95de6d7078b029b73708059a17cef20f332adcb7.zip
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/qed.c')
-rw-r--r--block/qed.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/qed.c b/block/qed.c
index adc2736dd7..59516a5704 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -1475,6 +1475,8 @@ static int bdrv_qed_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
memset(bdi, 0, sizeof(*bdi));
bdi->cluster_size = s->header.cluster_size;
bdi->is_dirty = s->header.features & QED_F_NEED_CHECK;
+ bdi->unallocated_blocks_are_zero = true;
+ bdi->can_write_zeroes_with_unmap = true;
return 0;
}