Re: [Qemu-devel] [PATCH 2/2] qcow2: Fix error handling in l2_allocate

2010-05-21 Thread Stefan Hajnoczi
On Thu, May 20, 2010 at 3:48 PM, Kevin Wolf wrote: > l2_allocate has some intermediate states in which the image is inconsistent. > Change the order to write to the L1 table only after the new L2 table has > successfully been initialized. Looks good. Stefan

[Qemu-devel] [PATCH 2/2] qcow2: Fix error handling in l2_allocate

2010-05-20 Thread Kevin Wolf
l2_allocate has some intermediate states in which the image is inconsistent. Change the order to write to the L1 table only after the new L2 table has successfully been initialized. Also reset the L2 cache in failure case, it's very likely wrong. Signed-off-by: Kevin Wolf --- block/qcow2-cluste