On 04/11/2011 11:31 AM, Stefan Hajnoczi wrote:
On Mon, Apr 11, 2011 at 10:37:32AM +0530, Amit Shah wrote:
> On (Fri) 08 Apr 2011 [12:33:27], Stefan Hajnoczi wrote:
> > The other concern I have about using O_EXCL is that we expose
> > ourselves to race conditions if there is ever a need to re-open the
> > device. When QEMU closes its file descriptor another program may be
> > scheduled to run and open the device with O_EXCL. Now QEMU will not
> > be able to open the CD-ROM anymore.
>
> The admins should really be the ones worrying about this, not QEMU.
Think of a desktop use case. virt-manager lets me pass through the host
CD-ROM today. Desktops have hald/udisks and you can't expect users to
disable/reenable those services just for QEMU.
It should be solved at that level then. If I insert a disc into an
assigned cd-rom drive, I shouldn't get a file manager or autorun window
to pop in the host, just the guest.
So: libvirt should inform the rest of the system that it is taking over
the cd-rom and as far as they're concerned, it no longer exists.
--
error compiling committee.c: too many arguments to function