cvs commit: src/sys/fs/specfs spec_vnops.c src/sys/kern
kern_conf.c vfs_bio.c vfs_subr.c src/sys/sys conf.h
Poul-Henning Kamp
phk at FreeBSD.org
Sat Feb 21 13:57:27 PST 2004
phk 2004/02/21 13:57:26 PST
FreeBSD src repository
Modified files:
sys/fs/specfs spec_vnops.c
sys/kern kern_conf.c vfs_bio.c vfs_subr.c
sys/sys conf.h
Log:
Device megapatch 6/6:
This is what we came here for: Hang dev_t's from their cdevsw,
refcount cdevsw and dev_t and generally keep track of things a lot
better than we used to:
Hold a cdevsw reference around all entrances into the device driver,
this will be necessary to safely determine when we can unload driver
code.
Hold a dev_t reference while the device is open.
KASSERT that we do not enter the driver on a non-referenced dev_t.
Remove old D_NAG code, anonymous dev_t's are not a problem now.
When destroy_dev() is called on a referenced dev_t, move it to
dead_cdevsw's list. When the refcount drops, free it.
Check that cdevsw->d_version is correct. If not, set all methods
to the dead_*() methods to prevent entrance into driver. Print
warning on console to this effect. The device driver may still
explode if it is also incompatible with newbus, but in that case
we probably didn't get this far in the first place.
Revision Changes Path
1.216 +30 -9 src/sys/fs/specfs/spec_vnops.c
1.146 +152 -31 src/sys/kern/kern_conf.c
1.428 +7 -0 src/sys/kern/vfs_bio.c
1.481 +4 -2 src/sys/kern/vfs_subr.c
1.182 +33 -18 src/sys/sys/conf.h
More information about the cvs-src
mailing list