]> git.ipfire.org Git - thirdparty/qemu.git/commit - block.c
block: introduce bdrv_swap, implement bdrv_append on top of it
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 14 Jun 2012 14:55:02 +0000 (16:55 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 9 Jul 2012 13:53:02 +0000 (15:53 +0200)
commit4ddc07cac2bd794e4ff17717551e66589e71e714
tree024b42c29733b2fac56495de095b30f11665f1db
parenta9fc4408e3511a073583a18b98a26765ff1e21d7
block: introduce bdrv_swap, implement bdrv_append on top of it

The new function can be made a bit nicer than bdrv_append.  It swaps the
whole contents, and then swaps back (using the usual t=a;a=b;b=t idiom)
the fields that need to stay on top.  Thus, it does not need explicit
bdrv_detach_dev, bdrv_iostatus_disable, etc.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
block.h