summaryrefslogtreecommitdiff
path: root/sys/miscfs/kernfs/kernfs_vfsops.c
Commit message (Collapse)AuthorAgeFilesLines
* Retire kernfs (kernel part).Dag-Erling Smørgrav2000-12-281-237/+0
| | | | Notes: svn path=/head/; revision=70426
* Remove unneeded #include <sys/proc.h> lines.Poul-Henning Kamp2000-10-291-1/+0
| | | | Notes: svn path=/head/; revision=67882
* Fix a 64-bitism, use size_t instead of u_int for 4th arg to copyinstr.John Baldwin2000-09-111-1/+1
| | | | Notes: svn path=/head/; revision=65722
* Remove stale, unused and bogus root device hunting code.Poul-Henning Kamp2000-07-271-24/+0
| | | | Notes: svn path=/head/; revision=63917
* Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson1999-12-191-0/+2
| | | | | | | | | | calls, vnops, vfsops, both in /kern, and to individual file systems that require a vfsop_ array entry. Reviewed by: eivind Notes: svn path=/head/; revision=54803
* Seperate the export check in VFS_FHTOVP, exports are now checked viaAlfred Perlstein1999-09-111-0/+1
| | | | | | | | | | | | VFS_CHECKEXP. Add fh(open|stat|stafs) syscalls to allow userland to query filesystems based on (network) filehandle. Obtained from: NetBSD Notes: svn path=/head/; revision=51138
* All unimplemented VFS ops now have entries in kern/vfs_default.c that returnAlfred Perlstein1999-09-071-27/+8
| | | | | | | | | | | | | | | | reasonable defaults. This avoids confusing and ugly casting to eopnotsupp or making dummy functions. Bogus casting of filesystem sysctls to eopnotsupp() have been removed. This should make *_vfsops.c more readable and reduce bloat. Reviewed by: msmith, eivind Approved by: phk Tested by: Jeroen Ruigrok/Asmodai <asmodai@wxs.nl> Notes: svn path=/head/; revision=51068
* Changed old-style option KERNFS_DIAGNOSTIC to DEBUG and fixed printfBruce Evans1999-08-291-13/+13
| | | | | | | | format errors exposed by this. It has nothing to do with diagnostics since it does little more than control tracing of normal operation. Notes: svn path=/head/; revision=50552
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Remove an unused variable.Bill Fumerola1999-08-171-2/+1
| | | | | | | Reviewed by: bde Notes: svn path=/head/; revision=49987
* The bdevsw() and cdevsw() are now identical, so kill the former.Poul-Henning Kamp1999-08-131-2/+2
| | | | Notes: svn path=/head/; revision=49679
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-311-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The cdevsw_add() function now finds the major number(s) in the struct cdevsw passed to it. cdevsw_add_generic() is no longer needed, cdevsw_add() does the same thing. cdevsw_add() will print an message if the d_maj field looks bogus. Remove nblkdev and nchrdev variables. Most places they were used bogusly. Instead check a dev_t for validity by seeing if devsw() or bdevsw() returns NULL. Move bdevsw() and devsw() functions to kern/kern_conf.c Bump __FreeBSD_version to 400006 This commit removes: 72 bogus makedev() calls 26 bogus SYSINIT functions if_xe.c bogusly accessed cdevsw[], author/maintainer please fix. I4b and vinum not changed. Patches emailed to authors. LINT probably broken until they catch up. Notes: svn path=/head/; revision=47640
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledPoul-Henning Kamp1999-05-111-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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). Notes: svn path=/head/; revision=47028
* I got tired of seeing all the cdevsw[major(foo)] all over the place.Poul-Henning Kamp1999-05-081-2/+2
| | | | | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too. Notes: svn path=/head/; revision=46676
* Continue where Julian left off in July 1998:Poul-Henning Kamp1999-05-071-2/+2
| | | | | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.) Notes: svn path=/head/; revision=46635
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-2/+1
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Removed statically configured mount type numbers (MOUNT_*) and allBruce Evans1998-09-071-2/+2
| | | | | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct. Notes: svn path=/head/; revision=38909
* As described by the submitter:Mike Smith1998-05-061-2/+1
| | | | | | | | | | | | | | | | Reverse the VFS_VRELE patch. Reference counting of vnodes does not need to be done per-fs. I noticed this while fixing vfs layering violations. Doing reference counting in generic code is also the preference cited by John Heidemann in recent discussions with him. The implementation of alternative vnode management per-fs is still a valid requirement for some filesystems but will be revisited sometime later, most likely using a different framework. Submitted by: Michael Hancock <michaelh@cet.co.jp> Notes: svn path=/head/; revision=35769
* The intent is to get rid of WILLRELE in vnode_if.src by makingMike Smith1998-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a complement to all ops that return a vpp, VFS_VRELE. This is initially only for file systems that implement the following ops that do a WILLRELE: vop_create, vop_whiteout, vop_mknod, vop_remove, vop_link, vop_rename, vop_mkdir, vop_rmdir, vop_symlink This is initial DNA that doesn't do anything yet. VFS_VRELE is implemented but not called. A default vfs_vrele was created for fs implementations that use the standard vnode management routines. VFS_VRELE implementations were made for the following file systems: Standard (vfs_vrele) ffs mfs nfs msdosfs devfs ext2fs Custom union umapfs Just EOPNOTSUPP fdesc procfs kernfs portal cd9660 These implementations may change as VOP changes are implemented. In the next phase, in the vop implementations calls to vrele and the vrele part of vput will be moved to the top layer vfs_vnops and made visible to all layers. vput will be replaced by unlock in these cases. Unlocking will still be done in the per fs layer but the refcount decrement will be triggered at the top because it doesn't hurt to hold a vnode reference a little longer. This will have minimal impact on the structure of the existing code. This will only be done for vnode arguments that are released by the various fs vop implementations. Wider use of VFS_VRELE will likely require restructuring of the code. Reviewed by: phk, dyson, terry et. al. Submitted by: Michael Hancock <michaelh@cet.co.jp> Notes: svn path=/head/; revision=33964
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.Poul-Henning Kamp1997-10-121-4/+6
| | | | | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde Notes: svn path=/head/; revision=30354
* Removed unused #includes.Bruce Evans1997-08-021-4/+1
| | | | Notes: svn path=/head/; revision=27845
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Add function prototypes for most of the new Lite2 functions.Mike Pritchard1997-02-121-1/+2
| | | | | | | | | Also made a few of the miscfs routines static to be consistent. Some modules simply required some additional #includes to remove -Wall warnings. Notes: svn path=/head/; revision=22579
* This is the kernel Lite/2 commit. There are some requisite userlandJohn Dyson1997-02-101-124/+29
| | | | | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org> Notes: svn path=/head/; revision=22521
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Moved the fsnode MALLOC to before the call to getnewvnode() so that theDavid Greenman1996-06-121-4/+7
| | | | | | | | | | | process won't possibly block before filling in the fsnode pointer (v_data) which might be dereferenced during a sync since the vnode is put on the mnt_vnodelist by getnewvnode. Pointed out by Matt Day <mday@artisoft.com> Notes: svn path=/head/; revision=16312
* another case where cdevsw becoming a pointer makes it neccesary toJulian Elischer1995-12-141-2/+6
| | | | | | | check if it's NULL Notes: svn path=/head/; revision=12831
* devsw tables are now arrays of POINTERS to struct [cb]devswJulian Elischer1995-12-131-2/+2
| | | | | | | | | | | | seems to work hre just fine though I can't check every file that changed due to limmited h/w, however I've checked enught to be petty happy withe hte code.. WARNING... struct lkm[mumble] has changed so it might be an idea to recompile any lkm related programs Notes: svn path=/head/; revision=12813
* Staticize.Poul-Henning Kamp1995-12-111-26/+26
| | | | Notes: svn path=/head/; revision=12769
* Fixed the type of kernfs_sync(). Trailing args were missing.Bruce Evans1995-11-161-5/+30
| | | | | | | | | | Fixed the type of kernfs_fhtovp(). The args had little resemblance to the correct ones. Added prototypes. Notes: svn path=/head/; revision=12334
* Fixed panic that resulted from mmaping files in kernfs and procfs. ADavid Greenman1995-05-251-1/+4
| | | | | | | | | | | | | regular user could panic the machine with a simple "tail /proc/curproc/mem" command. The problem was twofold: both kernfs and procfs didn't fill in the mnt_stat statfs struct (which would later lead to an integer divide fault in the vnode pager), and kernfs bogusly paniced if a bmap was attempted. Reviewed by: John Dyson Notes: svn path=/head/; revision=8740
* Add four more filesystem flags:Garrett Wollman1995-03-161-2/+2
| | | | | | | | | | | | | VFCF_NETWORK (this FS goes over the net) VFCF_READONLY (read-write mounts do not make any sense) VFCF_SYNTHETIC (data in this FS is not real) VFCF_LOOPBACK (this FS aliases something else) cd9660 is readonly; nullfs, umapfs, and union are loopback; NFS is netowkr; procfs, kernfs, and fdesc are synthetic. Notes: svn path=/head/; revision=7095
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'Bruce Evans1995-03-161-2/+1
| | | | | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones. Notes: svn path=/head/; revision=7090
* GCC cleanup.Poul-Henning Kamp1994-10-021-3/+5
| | | | | | | | | Reviewed by: Submitted by: Obtained from: Notes: svn path=/head/; revision=3311
* More loadable VFS changes:Garrett Wollman1994-09-221-1/+2
| | | | | | | | | | | - Make a number of filesystems work again when they are statically compiled (blush) - FIFOs are no longer optional; ``options FIFO'' removed from distributed config files. Notes: svn path=/head/; revision=2979
* Implemented loadable VFS modules, and made most existing filesystemsGarrett Wollman1994-09-211-1/+3
| | | | | | | loadable. (NFS is a notable exception.) Notes: svn path=/head/; revision=2946
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-0/+12
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+329
Notes: svn path=/head/; revision=1541