Re: [Q] claimed block devices

From: christophe . varoqui
Date: Thu Jul 22 2004 - 10:56:08 EST

Selon Dave Kleikamp <shaggy@xxxxxxxxxxxxxx>:

> On Thu, 2004-07-22 at 04:51, christophe.varoqui@xxxxxxx 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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at