Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 11:03:58 -0800
From:      Alfred Perlstein <bright@mu.org>
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>
In-Reply-To: <9124.1046372176@critter.freebsd.dk>
References:  <20030227184358.GC7206@elvis.mu.org> <9124.1046372176@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
* phk@phk.freebsd.dk <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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030227190358.GE7206>