qcow2: Fix error handling in l2_allocate
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: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 175e1152) Conflicts: block/qcow2-cluster.c Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Showing
想要评论请 注册 或 登录