Date: Tue, 11 May 1999 12:55:09 -0700 (PDT) From: Poul-Henning Kamp <phk@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/coda coda.h coda_venus.c src/sys/dev/ata ata-disk.c src/sys/dev/ccd ccd.c src/sys/dev/vn vn.c src/sys/i386/apm apm.c src/sys/i386/i386 mem.c src/sys/i386/isa diskslice_machdep.c if_le.c src/sys/i386/isa/pcvt pcvt_hdr.h ... Message-ID: <199905111955.MAA72062@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
phk 1999/05/11 12:55:08 PDT Modified files: sys/coda coda.h coda_venus.c sys/dev/ata ata-disk.c sys/dev/ccd ccd.c sys/dev/vn vn.c sys/i386/apm apm.c sys/i386/i386 mem.c sys/i386/isa diskslice_machdep.c if_le.c sys/i386/isa/pcvt pcvt_hdr.h sys/i386/linux linux_file.c linux_stats.c sys/isofs/cd9660 cd9660_node.c cd9660_node.h cd9660_rrip.c cd9660_vnops.c sys/kern kern_conf.c kern_descrip.c kern_proc.c subr_diskslice.c subr_dkbad.c uipc_usrreq.c vfs_subr.c sys/miscfs/devfs devfs_vnops.c sys/miscfs/kernfs kernfs_vfsops.c sys/miscfs/specfs spec_vnops.c specdev.h sys/msdosfs msdosfs_denode.c msdosfs_vnops.c sys/nfs nfs_serv.c nfs_subs.c nfs_vnops.c sys/ntfs ntfs_ihash.c ntfs_vfsops.c ntfs_vnops.c sys/sys conf.h param.h stat.h systm.h types.h vnode.h sys/ufs/mfs mfs_vfsops.c sys/ufs/ufs ufs_ihash.c ufs_vnops.c sys/vm device_pager.c Log: Divorce "dev_t" from the "major|minor" bitmap, which is now called udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl). Revision Changes Path 1.7 +2 -2 src/sys/coda/coda.h 1.7 +2 -2 src/sys/coda/coda_venus.c 1.10 +2 -2 src/sys/dev/ata/ata-disk.c 1.47 +2 -2 src/sys/dev/ccd/ccd.c 1.79 +2 -1 src/sys/dev/vn/vn.c 1.86 +2 -2 src/sys/i386/apm/apm.c 1.61 +2 -2 src/sys/i386/i386/mem.c 1.34 +2 -2 src/sys/i386/isa/diskslice_machdep.c 1.50 +2 -2 src/sys/i386/isa/if_le.c 1.32 +1 -1 src/sys/i386/isa/pcvt/pcvt_hdr.h 1.26 +5 -3 src/sys/i386/linux/linux_file.c 1.12 +2 -2 src/sys/i386/linux/linux_stats.c 1.28 +2 -2 src/sys/isofs/cd9660/cd9660_node.c 1.18 +2 -2 src/sys/isofs/cd9660/cd9660_node.h 1.15 +3 -3 src/sys/isofs/cd9660/cd9660_rrip.c 1.56 +2 -2 src/sys/isofs/cd9660/cd9660_vnops.c 1.37 +73 -2 src/sys/kern/kern_conf.c 1.61 +2 -2 src/sys/kern/kern_descrip.c 1.50 +3 -2 src/sys/kern/kern_proc.c 1.64 +2 -2 src/sys/kern/subr_diskslice.c 1.9 +2 -1 src/sys/kern/subr_dkbad.c 1.45 +2 -2 src/sys/kern/uipc_usrreq.c 1.194 +13 -10 src/sys/kern/vfs_subr.c 1.74 +4 -4 src/sys/miscfs/devfs/devfs_vnops.c 1.27 +1 -2 src/sys/miscfs/kernfs/kernfs_vfsops.c 1.86 +2 -2 src/sys/miscfs/specfs/spec_vnops.c 1.17 +2 -6 src/sys/miscfs/specfs/specdev.h 1.45 +2 -2 src/sys/msdosfs/msdosfs_denode.c 1.85 +2 -2 src/sys/msdosfs/msdosfs_vnops.c 1.77 +3 -3 src/sys/nfs/nfs_serv.c 1.74 +6 -6 src/sys/nfs/nfs_subs.c 1.129 +3 -3 src/sys/nfs/nfs_vnops.c 1.4 +2 -2 src/sys/ntfs/ntfs_ihash.c 1.5 +2 -2 src/sys/ntfs/ntfs_vfsops.c 1.4 +3 -3 src/sys/ntfs/ntfs_vnops.c 1.55 +13 -2 src/sys/sys/conf.h 1.47 +6 -1 src/sys/sys/param.h 1.16 +13 -5 src/sys/sys/stat.h 1.89 +13 -1 src/sys/sys/systm.h 1.31 +22 -20 src/sys/sys/types.h 1.87 +3 -3 src/sys/sys/vnode.h 1.62 +2 -2 src/sys/ufs/mfs/mfs_vfsops.c 1.19 +2 -2 src/sys/ufs/ufs/ufs_ihash.c 1.114 +3 -3 src/sys/ufs/ufs/ufs_vnops.c 1.41 +4 -4 src/sys/vm/device_pager.c 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?199905111955.MAA72062>