Give the device major / minor numbers their own separate 32 bit fields
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 9 May 2007 00:53:36 +0000 (00:53 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 9 May 2007 00:53:36 +0000 (00:53 +0000)
commit0e9b91307aa017412ee9a1b19966547e497d643d
tree22a42720f968daaa9107e6f1fd363b892994c675
parentee3181aeefd0d955412f0faeb96874156877a134
Give the device major / minor numbers their own separate 32 bit fields
in the kernel.  Change dev_ops to use a RB tree to index major device
numbers and remove the 256 device major number limitation.

Build a dynamic major number assignment feature into dev_ops_add() and
adjust ASR (which already had a hand-rolled one), and MFS to use the
feature.  MFS at least does not require any filesystem visibility to
access its backing device.  Major devices numbers >= 256 are used for
dynamic assignment.

Retain filesystem compatibility for device numbers that fall within the
range that can be represented in UFS or struct stat (which is a single
32 bit field supporting 8 bit major numbers and 24 bit minor numbers).
45 files changed:
sys/dev/disk/ata/atapi-cd.c
sys/dev/disk/nata/atapi-cd.c
sys/dev/raid/asr/asr.c
sys/dev/raid/vinum/.gdbinit.kernel
sys/dev/serial/sio/sio.c
sys/emulation/linux/linux_misc.c
sys/kern/kern_conf.c
sys/kern/kern_device.c
sys/kern/kern_kinfo.c
sys/kern/vfs_conf.c
sys/kern/vfs_jops.c
sys/kern/vfs_journal.c
sys/kern/vfs_subr.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_vnops.c
sys/sys/conf.h
sys/sys/device.h
sys/sys/journal.h
sys/sys/kern_syscall.h
sys/sys/vfscache.h
sys/sys/vnode.h
sys/vfs/fdesc/fdesc_vnops.c
sys/vfs/gnu/ext2fs/ext2_vfsops.c
sys/vfs/gnu/ext2fs/ext2_vnops.c
sys/vfs/hpfs/hpfs_vfsops.c
sys/vfs/hpfs/hpfs_vnops.c
sys/vfs/isofs/cd9660/cd9660_vfsops.c
sys/vfs/isofs/cd9660/cd9660_vnops.c
sys/vfs/mfs/mfs_vfsops.c
sys/vfs/mfs/mfs_vnops.c
sys/vfs/msdosfs/msdosfs_vfsops.c
sys/vfs/msdosfs/msdosfs_vnops.c
sys/vfs/nfs/nfs_serv.c
sys/vfs/nfs/nfs_subs.c
sys/vfs/nfs/nfs_vnops.c
sys/vfs/ntfs/ntfs_vfsops.c
sys/vfs/ntfs/ntfs_vnops.c
sys/vfs/nwfs/nwfs_node.c
sys/vfs/portal/portal_vnops.c
sys/vfs/smbfs/smbfs_node.c
sys/vfs/specfs/spec_vnops.c
sys/vfs/udf/udf_vfsops.c
sys/vfs/udf/udf_vnops.c
sys/vfs/ufs/ffs_vfsops.c
sys/vfs/ufs/ufs_vnops.c