]> xenbits.xensource.com Git - 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)
committerMichal Privoznik <mprivozn@redhat.com>
Sun, 27 Jan 2013 07:47:48 +0000 (08:47 +0100)
commit84c59ffaecc983083e2e885fa59c4f0ec1812656
tree9fa44900cc3b73a03e6b007ecc25741e474bfde0
parent99b92930d3482c69ac846823af368e927bafe2ac
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.
src/qemu/qemu_hotplug.c