]> git.proxmox.com Git - mirror_qemu.git/commit - block/block-backend.c
block: Add BB-BDS remove/insert notifiers
authorMax Reitz <mreitz@redhat.com>
Fri, 29 Jan 2016 15:36:03 +0000 (16:36 +0100)
committerMax Reitz <mreitz@redhat.com>
Tue, 2 Feb 2016 16:50:46 +0000 (17:50 +0100)
commit3301f6c6e9b52e370b07b3a08fd11735d0f0f292
tree0d5b6e7bac4f1b0e50e4d4233f61ae3059924e2b
parent16dee4183acb3755b8d2e76e6466a6fec5f1350e
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>
block/block-backend.c
include/sysemu/block-backend.h