On Tue, Apr 01, 2014 at 11:12:57AM +0200, Stefan Hajnoczi wrote: > preallocate() only links the first QCowL2Meta's data clusters into the > L2 table and ignores any chained QCowL2Metas in the linked list. > > Chains of QCowL2Meta structs are built up when contiguous clusters span > L2 tables. Each QCowL2Meta describes one L2 table update. This is a > rare case in preallocate() but can happen. > > This patch fixes preallocate() by iterating over the whole list of > QCowL2Metas. Compare with the qcow2_co_writev() function's > implementation, which is similar but also also handles request > dependencies. preallocate() only performs one allocation at a time so > there can be no dependencies. > > Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > --- > block/qcow2.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-)
Discussed with Kevin and applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan