From owner-freebsd-arch Tue Jan 5 16:27:02 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA11085 for freebsd-arch-outgoing; Tue, 5 Jan 1999 16:27:02 -0800 (PST) (envelope-from owner-freebsd-arch@FreeBSD.ORG) Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA11080 for ; Tue, 5 Jan 1999 16:27:00 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id BAA24161 for ; Wed, 6 Jan 1999 01:26:33 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id BAA23798 for freebsd-arch@freebsd.org; Wed, 6 Jan 1999 01:26:32 +0100 (MET) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id KAA16287 for ; Tue, 5 Jan 1999 10:26:11 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 0zxbAa-0004L7-00; Tue, 5 Jan 1999 11:25:32 -0700 Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.1/8.8.3) with ESMTP id LAA13960; Tue, 5 Jan 1999 11:23:29 -0700 (MST) Message-Id: <199901051823.LAA13960@harmony.village.org> To: Poul-Henning Kamp Subject: Re: DEVFS, the time has come... Cc: freebsd-arch@FreeBSD.ORG In-reply-to: Your message of "Tue, 05 Jan 1999 18:20:17 +0100." <20480.915556817@critter.freebsd.dk> References: <20480.915556817@critter.freebsd.dk> Date: Tue, 05 Jan 1999 11:23:29 -0700 From: Warner Losh Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <20480.915556817@critter.freebsd.dk> Poul-Henning Kamp writes: > I either case I can't see why the kernel part of devfs should know and > communicate more than the name and the class. All the sysctl stuff > seems superfluous to me. How will you handle the case of chroot > with a different policy with a sysctl anyway ? If anything it would > have to be (per) mount options, but all I can see it would be is > a "devd-lite-in-the-kernel" which is not very useful as I see it... I have two comments on this, and previous messages. 1) Given the design that I posted for what I called devfsd, sysctl is superfluous. 2) In an embedded environment, devfsd likely wouldn't be much fat compared to other things. I have a hard time believing that it would be much more than 32k-64k given the level of functionality that I'd like to place in it. Maybe this is the 'devd-lite' that phk is talking about, as I had no intention of supporting anything more than a 1-1 mapping of devices and permissions. I had no intention of supporting run a given shell script when device foo is created. Moving to that level likely would make devfsd something that is much larger than would be acceptable in an embedded environment. To recap the design for devfsd and what it requires of devfs: (1) devfsd will start by chmod/chown/chgrp the nodes it finds in its database. Otherwise it will exec a default script with one arg to get the node to have the right permissions. (2) devfsd will wakeup when a poll fires.[*] (3) devfsd will scan the tree, doing its thing ala startup, skipping those nodes that aren't new or changed. (1) devfs will honor chown, chgrp, chmod, symbolic links and mkdir. (2) devfs will cause the poll to fire[*] when one of these events happens. Nothing else. No sysctls are used. No device classes are needed (but could be implemented if someone wanted to do so). I should have a sample implementation of the above by the weekend, assuming that all goes well. The current devfs does (1), but not (2), so I'll likely "fake" that by some gross method for proof of concept. Warner [*] I'm being vague here because there are two ways this could happen. Justin talked about having a special poll event when a directory changed, which would be ideal. That isn't implemented yet. The other way is ala the apm stuff like Nate talked about. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message