On 11/24/2014 08:56 AM, Max Reitz wrote: > Create and destroy the metadata list on creation and destruction of a > qcow2 BDS, respectively. Skip creation if no overlap checks should be > performed. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/qcow2.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/block/qcow2.c b/block/qcow2.c > index ed88d69..f80f9ed 100644 > --- a/block/qcow2.c > +++ b/block/qcow2.c > @@ -744,6 +744,13 @@ static int qcow2_open(BlockDriverState *bs, QDict > *options, int flags, > overlap_check_template & (1 << i)) << i; > } > > + if (s->overlap_check) { > + ret = qcow2_create_empty_metadata_list(bs, 65536, errp);
Why 64k? Does this magic number need a name? Otherwise, Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature