]> git.proxmox.com Git - qemu.git/commit
block: bdrv_append() fixes
authorJeff Cody <jcody@redhat.com>
Tue, 27 Mar 2012 20:30:19 +0000 (16:30 -0400)
committerKevin Wolf <kwolf@redhat.com>
Thu, 5 Apr 2012 12:54:41 +0000 (14:54 +0200)
commitf6801b83d0e77ca025867800d805ee80f6bda938
tree89a2416a400c3609388128b0cc2b2d13106b4fad
parentd68dbee80e3964d9bb0ab29ad64675da148c3cac
block: bdrv_append() fixes

A few fixups for bdrv_append():

The new bs (bs_new) passed into bdrv_append() should be anonymous.  Rather
than call bdrv_make_anon() to enforce this, use an assert to catch when a caller
is passing in a bs_new that is not anonymous.

Also, the new top layer should have its backing_format reflect the original
top's format.

And last, after the swap of bs contents, the device_name will have been copied
down. This needs to be cleared to reflect the anonymity of the bs that was
pushed down.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c