Re: [RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2020-02-21 Thread Alberto Garcia
On Thu 20 Feb 2020 05:27:28 PM CET, Max Reitz wrote: >> +static inline uint64_t get_l2_bitmap(BDRVQcow2State *s, uint64_t *l2_slice, >> + int idx) >> +{ >> +if (has_subclusters(s)) { >> +idx *= l2_entry_size(s) / sizeof(uint64_t); >> +return b

Re: [RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2020-02-20 Thread Max Reitz
On 22.12.19 12:36, Alberto Garcia wrote: > Extended L2 entries are 128-bit wide: 64 bits for the entry itself and > 64 bits for the subcluster allocation bitmap. > > In order to support them correctly get/set_l2_entry() need to be > updated so they take the entry width into account in order to > c

[RFC PATCH v3 10/27] qcow2: Update get/set_l2_entry() and add get/set_l2_bitmap()

2019-12-22 Thread Alberto Garcia
Extended L2 entries are 128-bit wide: 64 bits for the entry itself and 64 bits for the subcluster allocation bitmap. In order to support them correctly get/set_l2_entry() need to be updated so they take the entry width into account in order to calculate the correct offset. This patch also adds th