]> git.ipfire.org Git - thirdparty/qemu.git/commit
block: Make BlockBackend own its BlockDriverState
authorMarkus Armbruster <armbru@redhat.com>
Tue, 7 Oct 2014 11:59:08 +0000 (13:59 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 20 Oct 2014 11:41:26 +0000 (13:41 +0200)
commit9ba10c95a4a63ef453893ba16bf1c8e11a1d3c39
treeeffe1e5953818f0965be290de0748b5516e7015a
parent8fb3c76c949f34f29c5252ee339fbe1cbfcc3234
block: Make BlockBackend own its BlockDriverState

On BlockBackend destruction, unref its BlockDriverState.  Replaces the
callers' unrefs.

This turns the pointer from BlockBackend to BlockDriverState into a
strong reference, managed with bdrv_ref() / bdrv_unref().  The
back-pointer remains weak.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/block-backend.c
blockdev.c
hw/block/xen_disk.c
qemu-img.c
qemu-io.c
qemu-nbd.c