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

2011-04-12 Thread Stefan Hajnoczi
On Tue, Apr 12, 2011 at 9:19 AM, Daniel P. Berrange wrote: > On Tue, Apr 12, 2011 at 10:10:44AM +0200, Kevin Wolf wrote: >> Am 12.04.2011 09:52, schrieb Daniel P. Berrange: >> >  - If the -drive specification has  readonly=on (thus O_RDONLY to >> >    open(2) call) , I expect QEMU (or the kernel)

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

2011-04-12 Thread Daniel P. Berrange
On Tue, Apr 12, 2011 at 10:10:44AM +0200, Kevin Wolf wrote: > Am 12.04.2011 09:52, schrieb Daniel P. Berrange: > > - If the -drive specification has readonly=on (thus O_RDONLY to > >open(2) call) , I expect QEMU (or the kernel) to forbid the > >"eject" command on the host CDROM. This shou

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

2011-04-12 Thread Kevin Wolf
Am 12.04.2011 09:52, schrieb Daniel P. Berrange: > - If the -drive specification has readonly=on (thus O_RDONLY to >open(2) call) , I expect QEMU (or the kernel) to forbid the >"eject" command on the host CDROM. This should prevent two guests >interfering seriously with each other. >

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

2011-04-12 Thread Daniel P. Berrange
On Fri, Apr 08, 2011 at 12:33:27PM +0100, 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

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

2011-04-11 Thread Christoph Hellwig
On Fri, Apr 08, 2011 at 12:33:27PM +0100, 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

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

2011-04-11 Thread Avi Kivity
On 04/08/2011 02:33 PM, 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 userspace process w