[lkml]   [2001]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectblkdev_get|put and how to get excl blk dev access w/i the kernel
I noticed some "locking" functions in the md driver which gave me the
impression of giving exclusive access to a block device. The functions
make use of:


These aren't particularly documented that I've seen and I haven't traced
through enough code to figure out for sure what exactly they'd lock and
not lock. But I've been playing around with them just to see what I could
do with an sd device which I'd "locked". It seems like I'm unable to run
fdisk against the disk, but other than that I can read/write (using dd)
the sd device without a problem. Is this what's supposed to happen?

If so, is there anything else I can do to get exclusive use of a system
device (especially particular sd and sg devices) from within the kernel?
This seems like it would be a generally desireable feature, although
I can understand people taking the stance of "if the sysadmin wants to
shoot themselves in the foot by writing to an sd directly instead of to
the filesystem mounted on that sd...more power to them." That's kind of my
thought, but somebody (my employer) wants this from me.


* tpepper@vato dot org * Venimus, Vidimus, *
* * Dolavimus *
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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