On 03.07.20 00:00, Alberto Garcia wrote: > On Thu 02 Jul 2020 11:57:46 AM CEST, Max Reitz wrote: >>> The reason why we would want to check it is, of course, because that >>> bit does have a meaning in regular L2 entries. >>> >>> But that bit is ignored in images with subclusters so the only reason >>> why we would check it is to report corruption, not because we need to >>> know its value. >> >> Sure. But isn’t that the whole point of having >> QCOW2_SUBCLUSTER_INVALID in the first place? > > At the moment we're only returning QCOW2_SUBCLUSTER_INVALID in cases > where there is no way to interpret the entry correctly: a) the > allocation and zero bits are set for the same subcluster, and b) the > allocation bit is set but the entry has no valid offset. > > It doesn't mean that we cannot use _SUBCLUSTER_INVALID for cases like > the one we're discussing, but this one is different from the other two.
OK, that makes sense. Max
signature.asc
Description: OpenPGP digital signature