aboutsummaryrefslogtreecommitdiff
path: root/block/qed.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-11-22 13:39:51 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-12-03 15:26:49 +0100
commitcffb1ec600de83f693a23578fc2f344c1af9b96f (patch)
treedc6c9e603941735a69cab5adecbeb9171a980e23 /block/qed.c
parent95de6d7078b029b73708059a17cef20f332adcb7 (diff)
downloadqemu-cffb1ec600de83f693a23578fc2f344c1af9b96f.zip
qemu-cffb1ec600de83f693a23578fc2f344c1af9b96f.tar.gz
qemu-cffb1ec600de83f693a23578fc2f344c1af9b96f.tar.bz2
block drivers: expose requirement for write same alignment from formats
This will let misaligned but large requests use zero clusters. This is important because the cluster size is not guest visible. 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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/qed.c b/block/qed.c
index 59516a5..450a1fa 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -495,6 +495,7 @@ static int bdrv_qed_open(BlockDriverState *bs, QDict *options, int flags,
}
}
+ bs->bl.write_zeroes_alignment = s->header.cluster_size >> BDRV_SECTOR_BITS;
s->need_check_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
qed_need_check_timer_cb, s);