Re: [PATCH v2] qcow2: Assert that host cluster offsets fit in L2 table entries

2020-01-14 Thread Max Reitz
On 13.01.20 17:11, Alberto Garcia wrote: > The standard cluster descriptor in L2 table entries has a field to > store the host cluster offset. When we need to get that offset from an > entry we use L2E_OFFSET_MASK to ensure that we only use the bits that > belong to that field. > > But while that

[PATCH v2] qcow2: Assert that host cluster offsets fit in L2 table entries

2020-01-13 Thread Alberto Garcia
The standard cluster descriptor in L2 table entries has a field to store the host cluster offset. When we need to get that offset from an entry we use L2E_OFFSET_MASK to ensure that we only use the bits that belong to that field. But while that mask is used every time we read from an L2 entry, it