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.
signature.asc
Description: PGP signature