Date: Tue, 27 May 2008 22:48:23 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Ed Schouten <ed@80386.nl> Cc: arch@freebsd.org Subject: Re: Simplifying devfs: minor == unit Message-ID: <20080527194823.GT21317@deviant.kiev.zoral.com.ua> In-Reply-To: <20080527193242.GN64397@hoeg.nl> References: <20080527130615.GJ64397@hoeg.nl> <20080527150244.GN21317@deviant.kiev.zoral.com.ua> <20080527165753.GK64397@hoeg.nl> <20080527191302.GS21317@deviant.kiev.zoral.com.ua> <20080527193242.GN64397@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--OowMmFE4aK71mEhh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 27, 2008 at 09:32:42PM +0200, Ed Schouten wrote: > * Kostik Belousov <kostikbel@gmail.com> wrote: > > On Tue, May 27, 2008 at 06:57:53PM +0200, Ed Schouten wrote: > > >=20 > > > Please take a look at src/usr.sbin/watch/watch.c:open_snp(). We might= as > > > well turn snp(4) into a single /dev/snp, where the kernel space driver > > > uses per-descriptor data to distinguish the instances. This provides > > > some advantages: > > >=20 > > > - No more silly open()-loops. > > >=20 > > > - A system administrator can change the permissions on /dev/snp, which > > > automatically sets a system wide policy, instead on one of the devi= ce > > > nodes. > > >=20 > > > - We don't fill up the system with a lot of unused nodes. > > >=20 > > > for i in `seq 1000` > > > do > > > ls /dev/bpf$i > /dev/null > > > done > > Please, do not overuse the cdevpriv data (I am not speaking about snp/w= atch > > ATM, each case requires careful decision). Using cdevpriv disables some > > features that may be provided by the clones, i.e. actual cdevs. For exa= mple, > > you cannot have several independent opens operate on the same instance. >=20 > I'll take a closer look at how it works when time permits. >=20 > Do you mind if I commit the minor =3D=3D unit patch one of these days/wee= ks? >=20 In fact, I do not understand why you leave the UMINORMASK stuff. It makes no sense with the unit =3D=3D minor, IMHO. --OowMmFE4aK71mEhh Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkg8ZYYACgkQC3+MBN1Mb4hL3wCg9+DhkoQYsMdsaPCrjrfmhtXk UNsAmwXuUbbwwGhwSBQ4yuedU47x7gjG =K+HF -----END PGP SIGNATURE----- --OowMmFE4aK71mEhh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080527194823.GT21317>