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/qcow2.c | |
parent | 95de6d7078b029b73708059a17cef20f332adcb7 (diff) |
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/qcow2.c')
-rw-r--r-- | block/qcow2.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 41e454a2f1..19e037406c 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -718,6 +718,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags, } qemu_opts_del(opts); + bs->bl.write_zeroes_alignment = s->cluster_sectors; if (s->use_lazy_refcounts && s->qcow_version < 3) { error_setg(errp, "Lazy refcounts require a qcow2 image with at least " |