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. Stefan