]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu_hotplug: Rework media changing process
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 24 Jan 2013 14:14:14 +0000 (15:14 +0100)
committerCole Robinson <crobinso@redhat.com>
Wed, 12 Jun 2013 19:46:36 +0000 (15:46 -0400)
commit7c4b6833bb89f38376a55b823175baeef26d6745
tree90f3373bf1f04c0f868ccb1c7a45de8f680a8f00
parent0305c271fcfcf7478cb96c36727253259a982355
qemu_hotplug: Rework media changing process

https://bugzilla.redhat.com/show_bug.cgi?id=892289

It seems like with new udev within guest OS, the tray is locked,
so we need to:
- 'eject'
- wait for tray to open
- 'change'

Moreover, even when doing bare 'eject', we should check for
'tray_open' as guest may have locked the tray. However, the
waiting phase shouldn't be unbounded, so I've chosen 10 retries
maximum, each per 500ms. This should give enough time for guest
to eject a media and open the tray.
(cherry picked from commit 84c59ffaecc983083e2e885fa59c4f0ec1812656)
src/qemu/qemu_hotplug.c