Instead of using an assertion, it is better to emit a corruption event
here. Checking all offsets for correct alignment can be tedious and it
is easily possible to forget to do so. qcow2_cache_do_get() is a
function every L2 and refblock access has to go through, so this is a
good central point t
On 11/10/2017 02:31 PM, Max Reitz wrote:
> Instead of using an assertion, it is better to emit a corruption event
> here. Checking all offsets for correct alignment can be tedious and it
> is easily possible to forget to do so. qcow2_cache_do_get() is a
> function every L2 and refblock access has
On 2017-11-10 22:54, Eric Blake wrote:
> On 11/10/2017 02:31 PM, Max Reitz wrote:
>> Instead of using an assertion, it is better to emit a corruption event
>> here. Checking all offsets for correct alignment can be tedious and it
>> is easily possible to forget to do so. qcow2_cache_do_get() is a
On 11/10/2017 04:00 PM, Max Reitz wrote:
>> Trying to understand this: we have a double corruption, because we
>> encountered a refblock that points outside of the image, but fixing the
>> refblock in turn encounters a second refblock that points within the
>> image but to an unaligned area.
>
> N
On 2017-11-10 23:15, Eric Blake wrote:
> On 11/10/2017 04:00 PM, Max Reitz wrote:
>>> Trying to understand this: we have a double corruption, because we
>>> encountered a refblock that points outside of the image, but fixing the
>>> refblock in turn encounters a second refblock that points within t
On Fri 10 Nov 2017 09:31:11 PM CET, Max Reitz wrote:
> +static inline const char *qcow2_cache_get_name(BDRVQcow2State *s, Qcow2Cache
> *c)
> +{
> +if (c == s->refcount_block_cache) {
> +return "refcount block";
> +} else if (c == s->l2_table_cache) {
> +return "L2 table";
>
On 2017-11-14 16:06, Alberto Garcia wrote:
> On Fri 10 Nov 2017 09:31:11 PM CET, Max Reitz wrote:
>> +static inline const char *qcow2_cache_get_name(BDRVQcow2State *s,
>> Qcow2Cache *c)
>> +{
>> +if (c == s->refcount_block_cache) {
>> +return "refcount block";
>> +} else if (c == s
On Tue 14 Nov 2017 04:09:16 PM CET, Max Reitz wrote:
>>> +static inline const char *qcow2_cache_get_name(BDRVQcow2State *s,
>>> Qcow2Cache *c)
>>> +{
>>> +if (c == s->refcount_block_cache) {
>>> +return "refcount block";
>>> +} else if (c == s->l2_table_cache) {
>>> +return