> > + L2 tables size 64KB is different from > > + cluster size 4KB. > > Umm, doesn't the cluster_bits (bytes 20-23 of the header) determine the > size of a cluster, rather than assuming a cluster is always 4KB? And > later on, the spec says that "L2 tables are exactly one cluster in > size.", so I'm not sure what this comment is doing here. Or are you > stating that deduplication _also_ has an L2 table, which is fixed in > size (unlike the normal L2 table for actual data)?
As most filesystems (ntfs, ext2/3/4, xfs) use 4KB blocs the deduplication works very well with 4KB clusters. The problem with 4KB cluster is that L2 table allocations are done very often and require a flush to disk which kill performance. So my patchset break compatibility with regular qcow2 image by using 64KB L2 table which are of a different size than the 4KB cluster. I'll let the choice for the user to choose the cluster size but will default to 4KB when creating a deduplicated image.