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
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 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";
>
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