lkml.org 
[lkml]   [1996]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Exclusive access to block devices
Grant R. Guenther:

: There doesn't appear to be any general way to specify that an
: ioctl should only be executed if the access count is == 1, or to
: test that a block device is not mounted or otherwise open ... (While
: an absolute race-free lock would be nice, a simple busy test would be
: adequate for the application.)

No, there doesn't appear to be such an animal.
My fdisk uses BLKRRPART for this purpose when starting up, but
this is an ugly solution.
(Later on, BLKRRPART is used again, but then really to make the kernel
reread the partition table.)

Andries


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