Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-13 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 13/09/2013 00:48, NeilBrown ha scritto: I'm not sure why O_EXCL would be correct on generic block devices when it's wrong on CD-ROMs. I think it's in fact more likely that other devices are shared, as backing files. O_EXCL make sense if you

Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-12 Thread Stefan Hajnoczi
On Thu, Sep 12, 2013 at 01:27:32PM +0200, Jack Wang wrote: Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already fixed by Neil), please see thread below: http://marc.info/?l=linux-raidm=137894040228125w=2 As Neil suggested it would be good for

Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-12 Thread Kevin Wolf
Am 12.09.2013 um 15:58 hat Stefan Hajnoczi geschrieben: On Thu, Sep 12, 2013 at 01:27:32PM +0200, Jack Wang wrote: Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already fixed by Neil), please see thread below:

[Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-12 Thread Jack Wang
Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already fixed by Neil), please see thread below: http://marc.info/?l=linux-raidm=137894040228125w=2 As Neil suggested it would be good for userspace applications to call open() with O_EXCL flag, to avoid

Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-12 Thread Jack Wang
On 09/12/2013 04:27 PM, Kevin Wolf wrote: Am 12.09.2013 um 15:58 hat Stefan Hajnoczi geschrieben: On Thu, Sep 12, 2013 at 01:27:32PM +0200, Jack Wang wrote: Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already fixed by Neil), please see thread

Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-12 Thread NeilBrown
On Thu, 12 Sep 2013 16:27:50 +0200 Kevin Wolf kw...@redhat.com wrote: Am 12.09.2013 um 15:58 hat Stefan Hajnoczi geschrieben: On Thu, Sep 12, 2013 at 01:27:32PM +0200, Jack Wang wrote: Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already