]> git.proxmox.com Git - mirror_qemu.git/commit - block.c
block: fix snapshot on QED
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 8 May 2012 14:51:41 +0000 (16:51 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 10 May 2012 08:32:12 +0000 (10:32 +0200)
commite023b2e244ddcc25308309d20c6bfd037897b10c
tree154bfaea2368cfcbb39a2d2610dd9019510a14ff
parent93e9eb6808c886f5f1c903b7ced1eed65de2ba39
block: fix snapshot on QED

QED's opaque data includes a pointer back to the BlockDriverState.
This breaks when bdrv_append shuffles data between bs_new and bs_top.
To avoid this, add a "rebind" function that tells the driver about
the new relationship between the BlockDriverState and its opaque.

The patch also adds rebind to VVFAT for completeness, even though
it is not used with live snapshots.

Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block/qed.c
block/vvfat.c
block_int.h