From owner-freebsd-arch Tue Jul 25 14:22:28 2000 Delivered-To: freebsd-arch@freebsd.org Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (Postfix) with ESMTP id DE5A337BBEF for ; Tue, 25 Jul 2000 14:22:21 -0700 (PDT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.3/8.9.3) with ESMTP id XAA14497; Tue, 25 Jul 2000 23:22:10 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: mjacob@feral.com Cc: freebsd-arch@FreeBSD.ORG Subject: Re: How much do we need the all-singing, all-dancing devfs? In-reply-to: Your message of "Tue, 25 Jul 2000 14:13:49 PDT." Date: Tue, 25 Jul 2000 23:22:09 +0200 Message-ID: <14495.964560129@critter.freebsd.dk> From: Poul-Henning Kamp Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message , Matthe w Jacob writes: >> >This does fit more with a real devfs tho.... >> >> Right, it sure does. >> >> I don't know if you followed some of the recent discussions about >> DEVFS, but one of my ideas is that cloning be implemented so that >> if the DEVFS doesn't find the name somebody tries to namei(), it >> will poll a list of driver functions (registered by the drivers) >> and if any of the drivers can instatiate the requested name they >> do so and the lookup succeeds from there. >> >> Doing it that way with a devfs means that you could actually >> open /dev/HW:BLABLA and if the cam driver recognized this as >> it's cue to examine the SCSI serial numbers it would do so >> and if it found one matching it would instantiate the device >> and your open would succeed. >> >> The advantage to that scheme is that we don't clutter /dev >> with 7 different names for each disk, only the names people >> try to open are present. > >Hmmmmm ... Ehrrmmmm.... Ummm..... > >Okay- then you'll get the same feel as the automounter gives when you do an ls >of '/net/freefall.freebsd.org'- a bit of a hang as this occurs and requires >any actual probing. No, there will not be a hang. The "ls /dev" will return only the currently instantiated names. Think about the PTY driver. The ls should only show the PTY's actually in use, not the potential 2000 ptys of the system. In the same way, if we did it my way, all the serial numbers and all that would not appear in the ls, until you had actually open(2)'ed a device using that name. Ie: # ls /dev/HW* # disklabel /dev/HW:BLABLA__2983942394 > /dev/null # ls /dev/HW* /dev/HW:BLABLA__2983942394 # The Delay happens for the disklabel command, which is the one which tries to use a non-instantiated name. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD coreteam member | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message