Messages in this thread | | | Date | Thu, 22 Jul 2004 17:54:45 +0200 | From | christophe.varoqui@free ... | Subject | Re: [Q] claimed block devices |
| |
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 -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |