Subject: Re: new kpi proposal, sysdisk(9)
To: Elad Efrat <elad@NetBSD.org>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 12/29/2006 11:51:00
Content-Type: text/plain; charset=us-ascii
On Thu, Dec 28, 2006 at 05:10:46PM +0200, Elad Efrat wrote:
> YAMAMOTO Takashi wrote:
> >> YAMAMOTO Takashi wrote:
> >>> YAMAMOTO Takashi
> >> other than the obvious issue of this being not as extensible as
> >> sysdisk(9), the VOP interface is something I'd rather not touch. :)
> > extensible? can you explain?
> in my original message I said we can, for example, add info as to what
> subsystem is making use of the device. I don't have other ideas at the
Ok, my thought here is that we really have two chunks of info, "In use" =20
and "In use by." One is a bit, and is readily controllable via VOP_OPEN() =
and VOP_CLOSE() calls. And for security reasons, that probably is the best
way to do it.
The other chunk of info, "In use by," really is a free-form bit of info.=20
i.e. a string. :-) It's a property of the device, and so you can probably=
guess what I'm going to suggest. :-)
Since we're making use of property lists, let's add property lists to=20
devices and add an ioctl that sets the, "In use by," property. Also add a=
"Get in use by" ioctl, and we're set for what you wanted to do.
I realize this is a bit of feature creep, but I think it's a way to do=20
what you want in a scalable method. And scaling was your (valid) concern=20
with just using VOP_OPEN().
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
-----END PGP SIGNATURE-----