qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v9 14/34] qcow2: Add QCow2SubclusterType and qcow2_get_subclu


From: Alberto Garcia
Subject: Re: [PATCH v9 14/34] qcow2: Add QCow2SubclusterType and qcow2_get_subcluster_type()
Date: Fri, 03 Jul 2020 00:00:01 +0200
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

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.

Berto



reply via email to

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