virtio-blk: Functions for op blocker management
authorMax Reitz <mreitz@redhat.com>
Fri, 29 Jan 2016 15:36:04 +0000 (16:36 +0100)
committerMax Reitz <mreitz@redhat.com>
Tue, 2 Feb 2016 16:50:46 +0000 (17:50 +0100)
commit1b1e0659a4c8888fba559e8d41051339e0a3cd8a
tree54a1763854ca21f490511e00afc41e7ea97b2d31
parent3301f6c6e9b52e370b07b3a08fd11735d0f0f292
virtio-blk: Functions for op blocker management

Put the code for setting up and removing op blockers into an own
function, respectively. Then, we can invoke those functions whenever a
BDS is removed from an virtio-blk BB or inserted into it.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/dataplane/virtio-blk.c