Searched hist:dd62f1ca433ea60b06590884642ad2c8f8e539f2 (Results 1 – 2 of 2) sorted by relevance
/openbmc/qemu/ |
H A D | blockdev.c | diff dd62f1ca433ea60b06590884642ad2c8f8e539f2 Thu Jun 18 07:09:57 CDT 2015 Kevin Wolf <kwolf@redhat.com> block: Implement bdrv_append() without bdrv_swap()
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 <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|
H A D | block.c | diff dd62f1ca433ea60b06590884642ad2c8f8e539f2 Thu Jun 18 07:09:57 CDT 2015 Kevin Wolf <kwolf@redhat.com> block: Implement bdrv_append() without bdrv_swap()
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 <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
|