From: tpepper@vato.org
To: linux-kernel@vger.kernel.org
Subject: blkdev_get|put and how to get excl blk dev access w/i the kernel
Date: Mon, 16 Jul 2001 10:55:01 -0700 [thread overview]
Message-ID: <20010716105501.A31759@cb.vato.org> (raw)
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:
bdget
blkdev_get
blkdev_put
bdput
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.
Tim
--
*********************************************************
* tpepper@vato dot org * Venimus, Vidimus, *
* http://www.vato.org/~tpepper * Dolavimus *
*********************************************************
reply other threads:[~2001-07-16 17:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010716105501.A31759@cb.vato.org \
--to=tpepper@vato.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®