Re: [Qemu-devel] One more thing about block device locking

2010-04-23 Thread Kevin Wolf
Am 23.04.2010 10:00, schrieb Richard W.M. Jones: > On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote: >> So we'll have to either >> trial and error, or open "normally", check >> if it's a block device and re-open with that >> flag set. > > Perhaps I'm missing something, but why can't

Re: [Qemu-devel] One more thing about block device locking

2010-04-23 Thread Michael Tokarev
Richard W.M. Jones wrote: > On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote: >> So we'll have to either >> trial and error, or open "normally", check >> if it's a block device and re-open with that >> flag set. > > Perhaps I'm missing something, but why can't you stat(2) the name >

Re: [Qemu-devel] One more thing about block device locking

2010-04-23 Thread Richard W.M. Jones
On Fri, Apr 23, 2010 at 09:07:28AM +0400, Michael Tokarev wrote: > So we'll have to either > trial and error, or open "normally", check > if it's a block device and re-open with that > flag set. Perhaps I'm missing something, but why can't you stat(2) the name first to see if it's a block device (

[Qemu-devel] One more thing about block device locking

2010-04-22 Thread Michael Tokarev
While I'm reviewing a thread about block device locking, here's another data point which were not touched before, as far as I remember. It is related. What I'm talking is - when fsck/mkfs/... family of programs are run against a mounted (or in use by other means) device, they warn you about this