| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Let the console driver ask for major 256 and magically change this to
mean zero.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
branches:
Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.
This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.
Approved by: re(scottl)
|
|
|
|
| |
if they are NULL.
|
|
|
|
| |
Remove cdevsw->d_size() implementation. No longer needed.
|
|
|
|
| |
Replace devfs_{create,destroy} hooks with direct function calls.
|
|
|
|
| |
sure it is marked as allocated in reserved_majors[]. Whine if it wasn't.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To do this, initialize the d_maj member of the cdevsw to MAJOR_AUTO.
When the cdevsw is first passed to make_dev() a free major number
will be assigned.
Until we have a bit more experience with this a printf will announce
this fact.
Major numbers are not reclaimed, so loading/unloading the same
device driver which uses MAJOR_AUTO will eventually deplete the
pool of free major numbers and the system will panic when it can
not allocate one. Still undecided who to invonvenience with the
solution to this.
|
|
|
|
|
| |
Remove cdevsw_add() and cdevsw_remove(), they served us well for a long time.
Bump __FreeBSD_version to 500104 to mark this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retire the "d_dump_t" and use the "dumper_t" type instead.
Dumper_t takes a void * as first arg which is more general than the
dev_t taken by d_dump_t. (Remember: we could have net-dumpers if
somebody wrote us one!)
Define the convention for GEOM controlled disk devices to be that the
first argument to the dumper function is the struct disk pointer.
Change device drivers accordingly.
|
|
|
|
|
|
|
| |
In devsw() return dead_cdevsw instead of NULL in case the dev_t does not
have a si_devsw.
This may improve our survival chances with devices which go away unexpectedly.
|
| |
|
|
|
|
|
| |
become an issue now that end-user controlable attributes can become devices
names with the geom_vol_ffs class.
|
|
|
|
|
|
|
|
|
|
| |
Change the si_name of dev_t's to be a char * and put a private buffer for
holding the name at then end of the struct.
Initialize si_name to point to the private buffer.
Put a KASSERT in geom_disk to prevent overrun on the fake dev_t we still
have to generate for the disk_drivers.
|
| |
|
|
|
|
|
|
|
|
| |
This implicitly removes the need for major numbers, but a number of
drivers still know things they shouldn't need to, and we need to
consider if there are applications which cache major(+minor) gleaned
from stat(2) and rely on it being constant over reboots before we
start assigning random majors.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
was used to control code which were conditional on DEVFS' precense
since this avoided the need for large-scale source pollution with
#include "opt_geom.h"
Now that we approach making DEVFS standard, replace these tests
with an #ifdef to facilitate mechanical removal once DEVFS becomes
non-optional.
No functional change by this commit.
|
| |
|
|
|
|
| |
able to handle (0xffffff).
|
|
|
|
| |
Agreed on: jake, rwatson, jhb
|
|
|
|
|
| |
The vast majority of the contents is from my keyboard and no
significant pieces remain of the former copyright holders code.
|
|
|
|
| |
Spotted by: Neelkanth Natu <neelnatu@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#!bin/sh
# Original version of this by Michael Reifenberger
# <root@nihil.plaut.de>.
mdconfig -d -u 11 >/dev/null 2>&1
dd if=/dev/zero of=zz bs=1m count=1
while :
do
mdconfig -a -t vnode -f zz -u 11
fdisk -f - -iv /dev/md11 <<EOF1
g c1 h64 s32
p 1 165 0 2048
a 1
EOF1
mdconfig -d -u 11
done
Garbage pointers in __si_u were not cleared by destroy_dev(). Not
clearing si_disk made the above fatal because the disk layer uses
si_disk as a flag to indicate that the dev_t has been completely
initialized. disk_destroy() clears si_disk for the parent dev_t
but doesn't get called for children.
Not fixed:
- setting the undocumented sysctl debug.free_devt should cause more
complete destruction of the dev_t including clearing of __si_u, but
actually causes the above to panic a little earlier.
- the loop leaks 10 memory allocations per iteration (4 DEVFS, 2 devbuf
and 4 dev_t).
Reviewed by: timeout by MAINTAINER after 3 months
|
| |
|
|
|
|
| |
Forgot to include lock.h and mutex.h for GIANT_REQUIRED.
|
|
|
|
|
| |
they choose to destroy themselves without regard to whether or not
they are open.
|
|
|
|
|
|
| |
and devices can be created anytime after that.
Print a warning if an atttempt is made to create a device too early.
|
|
|
|
|
| |
noticed it in there already. That should teach me to check exit
code from cvsup.
|
|
|
|
|
| |
PR: 32019
Submitted by: fenner
|
|
|
|
|
| |
PR: kern/32019
Reviewed by: phk
|
|
|
|
|
|
|
|
| |
non-existent disk in a legacy /dev on a DEVFS system would panic the system
if stat(2)'ed.
Do not whine about anonymous device nodes not having a si_devsw, they're
not supposed to.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make it a panic to repeat make_dev() or destroy_dev(), this check
should maybe be neutered when -current goes -stable.
Whine if devsw() is called on anon dev_t's in a devfs system.
Make a hack to avoid our lazy-eval disk code triggering the above whine.
Fix the multiple make_dev() in disk code by making ${disk}${unit}s${slice}
an alias/symlink to ${disk}${unit}s${slice}c
|
| |
|
|
|
|
|
| |
This function returns success if the device is known by either 'name'
or any of its aliases.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
|
|
|
|
|
|
| |
Approved on IRC as long as it didn't cause a large number of warnings by: phk
MFC After: 700 hours
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dev_t. The dev_depends(dev_t, dev_t) function is for tying them
to each other.
When destroy_dev() is called on a dev_t, all dev_t's depending
on it will also be destroyed (depth first order).
Rewrite the make_dev_alias() to use this dependency facility.
kern/subr_disk.c:
Make the disk mini-layer use dependencies to make sure all
relevant dev_t's are removed when the disk disappears.
Make the disk mini-layer precreate some magic sub devices
which the disk/slice/label code expects to be there.
kern/subr_disklabel.c:
Remove some now unneeded variables.
kern/subr_diskmbr.c:
Remove some ancient, commented out code.
kern/subr_diskslice.c:
Minor cleanup. Use name from dev_t instead of dsname()
|
| |
|
|
|
|
| |
us unit numbers which doesn't fit in 24 bits.
|
|
|
|
|
|
| |
structure rather than assuming that the device vnode would reside
in the FFS filesystem (which is obviously a broken assumption with
the device filesystem).
|
| |
|
|
|
|
| |
Reminded by: bde
|
|
|
|
|
| |
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
|
| |
|
| |
|
|
|
|
|
|
|
| |
This removes support for booting current kernels with very old bootblocks.
Device driver writers: Please remove initializations for the d_bmaj
field in your cdevsw{}.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
which hides the 'hole' in the minor bits.
Introduce unit2minor() to do the reverse operation.
Fix some some make_dev() calls which didn't use UID_* or GID_* macros.
Kill the v_hashchain alias macro, it hides the real relationship.
Introduce experimental SI_CHEAPCLONE flag set it on cloned bpfs.
|
|
|
|
|
|
| |
A couple of new warnings may be emitted during boot if drivers DTWT.
Tested by: George Cox <gjvc@gjvc.com>
|