On 01.10.2015 15:13, Kevin Wolf wrote: > Remember all parent nodes and just change the pointers there instead of > swapping the contents of the BlockDriverState. > > Handling of snapshot=on must be moved further down in bdrv_open() > because *pbs (which is the bs pointer in the BlockBackend) must already > be set before bdrv_append() is called. Otherwise bdrv_append() changes > the BB's pointer to the temporary snapshot, but bdrv_open() overwrites > it with the read-only original image. > > We also need to be careful to update callers as the interface changes > (becomes less insane): Previously, the meaning of the two parameters was > inverted when bdrv_append() returns. Now any BDS pointers keep pointing > to the same node. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block.c | 112 > +++++++++++++++++++++++++++++++++++++++++++++---------------- > blockdev.c | 2 +- > 2 files changed, 85 insertions(+), 29 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature