aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2016-01-29 16:36:03 +0100
committerMax Reitz <mreitz@redhat.com>2016-02-02 17:50:46 +0100
commit3301f6c6e9b52e370b07b3a08fd11735d0f0f292 (patch)
tree0d5b6e7bac4f1b0e50e4d4233f61ae3059924e2b /include/sysemu
parent16dee4183acb3755b8d2e76e6466a6fec5f1350e (diff)
downloadqemu-3301f6c6e9b52e370b07b3a08fd11735d0f0f292.zip
qemu-3301f6c6e9b52e370b07b3a08fd11735d0f0f292.tar.gz
qemu-3301f6c6e9b52e370b07b3a08fd11735d0f0f292.tar.bz2
block: Add BB-BDS remove/insert notifiers
bdrv_close() no longer signifies ejection of a medium, this is now done by removing the BDS from the BB. Therefore, we want to have a notifier for that in the BB instead of a close notifier in the BDS. The former is added now, the latter is removed later. Symmetrically, another notifier list is added that is invoked whenever a BDS is inserted. We will need that for virtio-blk and virtio-scsi, which can then remove their op blockers on BDS ejection and set them up on insertion. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/block-backend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 1568554..e12be67 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -164,6 +164,8 @@ void blk_remove_aio_context_notifier(BlockBackend *blk,
void *),
void (*detach_aio_context)(void *),
void *opaque);
+void blk_add_remove_bs_notifier(BlockBackend *blk, Notifier *notify);
+void blk_add_insert_bs_notifier(BlockBackend *blk, Notifier *notify);
void blk_add_close_notifier(BlockBackend *blk, Notifier *notify);
void blk_io_plug(BlockBackend *blk);
void blk_io_unplug(BlockBackend *blk);