Subject: Re: new kpi proposal, sysdisk(9)
To: Elad Efrat <elad@NetBSD.org>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 12/29/2006 11:51:00
--7DO5AaGCk89r4vaK
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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. :)
> >=20
> > extensible? can you explain?
>=20
> 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
> moment.
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() =
=20
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=
=20
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=
=20
"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().
Take care,
Bill
--7DO5AaGCk89r4vaK
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)
iD8DBQFFlXGkWz+3JHUci9cRAoHhAJ91FDanWNS7k+olzHDsvVQ2wI7zgQCfdlPb
K4Yq1sV+ELVWAgxCm/EamJ0=
=lUZZ
-----END PGP SIGNATURE-----
--7DO5AaGCk89r4vaK--