virtio-blk: allow drive_del with dataplane
commit3255d1c21f364774390061fbc3b8e25c027cc862
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 18 Aug 2014 15:07:13 +0000 (18 16:07 +0100)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 29 Aug 2014 15:01:48 +0000 (29 16:01 +0100)
treea03b99470af3b48cd5c249b7326211f86ce9eed9
parent8ad4202bf61bc1d124ff26016cfe17cb261cc392
virtio-blk: allow drive_del with dataplane

Now that drive_del acquires the AioContext we can safely allow deleting
the drive.  As with non-dataplane mode, all I/Os submitted by the guest
after drive_del will return EIO.

This patch makes hot unplug work with virtio-blk dataplane.  Previously
drive_del reported an error because the device was busy.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/dataplane/virtio-blk.c