* [Q] claimed block devices
@ 2004-07-22 9:51 christophe.varoqui
2004-07-22 12:29 ` Dave Kleikamp
0 siblings, 1 reply; 4+ messages in thread
From: christophe.varoqui @ 2004-07-22 9:51 UTC (permalink / raw)
To: linux-kernel
Hello,
does somebody know how a userspace C-proggy can detect if a block device is
claimed ? Creating a device map over such devices will fail, so better not to
try.
regards,
cvaroqui
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] claimed block devices
2004-07-22 9:51 [Q] claimed block devices christophe.varoqui
@ 2004-07-22 12:29 ` Dave Kleikamp
2004-07-22 15:54 ` christophe.varoqui
0 siblings, 1 reply; 4+ messages in thread
From: Dave Kleikamp @ 2004-07-22 12:29 UTC (permalink / raw)
To: christophe.varoqui; +Cc: linux-kernel
On Thu, 2004-07-22 at 04:51, christophe.varoqui@free.fr wrote:
> Hello,
>
> does somebody know how a userspace C-proggy can detect if a block device is
> claimed ? Creating a device map over such devices will fail, so better not to
> try.
I believe trying to open the device with O_EXCL will fail if the device
is claimed.
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] claimed block devices
2004-07-22 12:29 ` Dave Kleikamp
@ 2004-07-22 15:54 ` christophe.varoqui
2004-07-22 16:13 ` Dave Kleikamp
0 siblings, 1 reply; 4+ messages in thread
From: christophe.varoqui @ 2004-07-22 15:54 UTC (permalink / raw)
To: Dave Kleikamp; +Cc: linux-kernel
Selon Dave Kleikamp <shaggy@austin.ibm.com>:
> On Thu, 2004-07-22 at 04:51, christophe.varoqui@free.fr wrote:
> > Hello,
> >
> > does somebody know how a userspace C-proggy can detect if a block device is
> > claimed ? Creating a device map over such devices will fail, so better not
> to
> > try.
>
> I believe trying to open the device with O_EXCL will fail if the device
> is claimed.
>
> Shaggy
> --
if I read fs/block_dev.c correctly, O_EXCL will always fail on block device.
I would also like to use the lock owner information ... which seems even more
tricky.
regards,
cvaroqui
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Q] claimed block devices
2004-07-22 15:54 ` christophe.varoqui
@ 2004-07-22 16:13 ` Dave Kleikamp
0 siblings, 0 replies; 4+ messages in thread
From: Dave Kleikamp @ 2004-07-22 16:13 UTC (permalink / raw)
To: christophe.varoqui; +Cc: linux-kernel
On Thu, 2004-07-22 at 10:54, christophe.varoqui@free.fr wrote:
> if I read fs/block_dev.c correctly, O_EXCL will always fail on block device.
In blkdev_open()? If O_EXCL is set, the result will depend on whether
or not bd_claim() succeeds.
> I would also like to use the lock owner information ... which seems even more
> tricky.
I don't have any suggestions here. :^(
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-22 20:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-22 9:51 [Q] claimed block devices christophe.varoqui
2004-07-22 12:29 ` Dave Kleikamp
2004-07-22 15:54 ` christophe.varoqui
2004-07-22 16:13 ` Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®