From owner-cvs-all Thu Feb 27 11: 4: 1 2003 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C0B637B405; Thu, 27 Feb 2003 11:03:59 -0800 (PST) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D89F043FAF; Thu, 27 Feb 2003 11:03:58 -0800 (PST) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AABDDAE160; Thu, 27 Feb 2003 11:03:58 -0800 (PST) Date: Thu, 27 Feb 2003 11:03:58 -0800 From: Alfred Perlstein To: phk@phk.freebsd.dk Cc: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_conf.c src/sys/sys conf.h Message-ID: <20030227190358.GE7206@elvis.mu.org> References: <20030227184358.GC7206@elvis.mu.org> <9124.1046372176@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9124.1046372176@critter.freebsd.dk> User-Agent: Mutt/1.4i Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * phk@phk.freebsd.dk [030227 10:56] wrote: > In message <20030227184358.GC7206@elvis.mu.org>, Alfred Perlstein writes: > > > >Perhaps if you remebered the name assigned and it came back again you > >could assign the old major? > > The simple and effective solution is to refcount cdevsw structures > from make_dev(+) and destroy_dev(-) calls and when the count goes > to zero reclaim the major number. I experiment with this already > here, but it has some locking implications which forces me to > reconsider the self-locking structure of kern_conf.c and devfs and > that makes the otherwise rather simple task non-simple. I'll get > there eventually though. Oh, I didn't realize that this wasn't already implemented. > The other issue which I am pondering is a way to share major# for > devices which don't care about which exact minor# they get. Typical > examples being /dev/ccd.ctl and /dev/geom.ctl, wasting an entire > major number for each of those is silly. > > I may introduce a different magic marker which says "allocate me > both a major and minor" which would allow these kinds of devices > to share one major number. That's a good idea, a "don't care" node, even if hardwired would work. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message