qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC v2 4/8] qcow2: extract image creation option parsi


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC v2 4/8] qcow2: extract image creation option parsing
Date: Mon, 20 Mar 2017 15:40:15 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Sat, Mar 18, 2017 at 08:14:45PM +0000, Nir Soffer wrote:
> > @@ -2235,7 +2284,7 @@ static int qcow2_create2(const char *filename,
> > int64_t total_size,
> >      *header = (QCowHeader) {
> >          .magic                      = cpu_to_be32(QCOW_MAGIC),
> >          .version                    = cpu_to_be32(version),
> > -        .cluster_bits               = cpu_to_be32(cluster_bits),
> > +        .cluster_bits               = cpu_to_be32(ctz32(cluster_size)),
> >
> 
> Is this related?

Yes, the main cluster_bits code was extracted into
qcow2_opt_get_cluster_size_del() above.

This is now the only place in qcow2_create2() the needs this value so I
inlined the expression and dropped the variable.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]