Re: [Qemu-devel] Re: To O_EXCL or not to O_EXCL open host_cdrom

2011-04-11 Thread Avi Kivity
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

[Qemu-devel] Re: To O_EXCL or not to O_EXCL open host_cdrom

2011-04-11 Thread Stefan Hajnoczi
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 descr

[Qemu-devel] Re: To O_EXCL or not to O_EXCL open host_cdrom

2011-04-10 Thread Amit Shah
On (Fri) 08 Apr 2011 [12:33:27], Stefan Hajnoczi wrote: > Amit and I were discussing the pros and cons of using O_EXCL to open > host CD-ROM devices on IRC but this discussion could benefit from more > input. > > Linux block devices (like /dev/sr0 CD-ROMs) can be opened with O_EXCL > and only one