diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-11-22 13:39:51 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-12-03 15:26:49 +0100 |
commit | cffb1ec600de83f693a23578fc2f344c1af9b96f (patch) | |
tree | dc6c9e603941735a69cab5adecbeb9171a980e23 /block/qed.c | |
parent | 95de6d7078b029b73708059a17cef20f332adcb7 (diff) | |
download | qemu-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.c | 1 |
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); |