lkml.org 
[lkml]   [2004]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.132 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site