summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_init.c
Commit message (Collapse)AuthorAgeFilesLines
* Another round of the <sys/queue.h> FOREACH transmogriffer.Poul-Henning Kamp2001-02-041-2/+1
| | | | | | | | Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=72012
* Convert more malloc+bzero to malloc+M_ZERO.David Malone2000-12-081-2/+2
| | | | | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net> Notes: svn path=/head/; revision=69781
* Untangle vfsinit() a bit. Use seperate sysinit functions rather thanPeter Wemm2000-12-061-23/+2
| | | | | | | having a super-function calling bits all over the place. Notes: svn path=/head/; revision=69664
* Do not panic on an uninitialized VOP_xxx() call. This was meant as aPeter Wemm2000-09-061-2/+2
| | | | | | | | | | | | | | | | | | | | sanity check, but it is too easy to run into, eg: making an ACL syscall when no filesystems have the ACL implementation enabled. The original reason for the panic was that the VOP_ vector had not been assigned and therefor could not be passed down the stack.. and there was no point passing it down since nothing implemented it anyway. vop_defaultop entries could not pass it on because it had a zero (unknown) vector that was indistinguishable from another unknown VOP vector. Anyway, we can do something reasonable in this case, we shouldn't need to panic here as there is a reasonable recovery option (return EOPNOTSUPP and dont pass it down the stack). Requested by: rwatson Notes: svn path=/head/; revision=65527
* The sysctl mod_xx hack is no longer required now that we have totallyPeter Wemm1999-12-121-10/+0
| | | | | | | dynamic sysctl registration. Notes: svn path=/head/; revision=54497
* Move a couple of globals here where they are initialised, rather thanMike Smith1999-11-011-0/+7
| | | | | | | orphaning them in vfs_conf.c Notes: svn path=/head/; revision=52780
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Removed references to a nonexistent variable. This fixes building kernelsBruce Evans1999-07-291-4/+1
| | | | | | | without -O. Notes: svn path=/head/; revision=49206
* * Register sysctl nodes before running sysinits when loading files andDoug Rabson1999-03-071-2/+21
| | | | | | | | | | | unregister them after sysuninits when unloading. * Add code to vfs_register() to set the oid number of vfs sysctls to the type number of the filesystem. Reviewed by: bde Notes: svn path=/head/; revision=44549
* * Change sysctl from using linker_set to construct its tree using SLISTs.Doug Rabson1999-02-161-46/+1
| | | | | | | | | | | | | This makes it possible to change the sysctl tree at runtime. * Change KLD to find and register any sysctl nodes contained in the loaded file and to unregister them when the file is unloaded. Reviewed by: Archie Cobbs <archie@whistle.com>, Peter Wemm <peter@netplex.com.au> (well they looked at it anyway) Notes: svn path=/head/; revision=44078
* Fix warnings related to -Wall -Wcast-qualMatthew Dillon1999-01-281-2/+2
| | | | Notes: svn path=/head/; revision=43351
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-281-12/+12
| | | | | | | kernel compile Notes: svn path=/head/; revision=43311
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-071-6/+2
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Fixed the type of vfs_modevent (a little late, to match the correspondingBruce Evans1998-11-151-2/+2
| | | | | | | change in sys/mount.h). Notes: svn path=/head/; revision=41170
* Make the vnode opv vector construction fully dynamic. Previously wePeter Wemm1998-11-101-125/+223
| | | | | | | | | | | | | | | | | | | | | | | leaked memory on each unload and were limited to items referenced in the kernel copy of vnode_if.c. Now a kernel module is free to create it's own VOP_FOO() routines and the rest of the system will happily deal with it, including passthrough layers like union/umap/etc. Have VFS_SET() call a common vfs_modevent() handler rather than inline duplicating the common code all over the place. Have VNODEOP_SET() have the vnodeops removed at unload time (assuming a module) so that the vop_t ** vector is reclaimed. Slightly adjust the vop_t ** vectors so that calling slot 0 is a panic rather than a page fault. This could happen if VOP_something() was called without *any* handlers being present anywhere (including in vfs_default.c). slot 1 becomes the default vector for the vnodeop table. TODO: reclaim zones on unload (eg: nfs code) Notes: svn path=/head/; revision=41056
* General tidy up: remove more unused code, update comments, simplify somePeter Wemm1998-11-041-34/+16
| | | | | | | routines a little. Notes: svn path=/head/; revision=40880
* Nitpicking and dusting performed on a train. Removes trivial warningsPoul-Henning Kamp1998-10-251-12/+2
| | | | | | | about unused variables, labels and other lint. Notes: svn path=/head/; revision=40648
* Fixed sysctl attachment for statically configured vfs's.Bruce Evans1998-10-251-16/+25
| | | | | | | Broken in: previous commit Notes: svn path=/head/; revision=40637
* *gulp*. Jordan specifically OK'ed this..Peter Wemm1998-10-161-79/+194
| | | | | | | | | | | This is the bulk of the support for doing kld modules. Two linker_sets were replaced by SYSINIT()'s. VFS's and exec handlers are self registered. kld is now a superset of lkm. I have converted most of them, they will follow as a seperate commit as samples. This all still works as a static a.out kernel using LKM's. Notes: svn path=/head/; revision=40435
* Taking the GENERIC kernel and commenting out MSDOSFS, CD9660{,_ROOT}, PROCFS,David E. O'Brien1998-10-051-2/+3
| | | | | | | | | | | | | | | | | | NFS_ROOT will produce kernel that cannot mount a UFS /. Vfs type numbers must be distinct from VFS_GENERIC (and VFS_VFSCONF, but that has the same value and should go away). The problem happens because NFS is the first vfs (in sys/conf order) so it gets type number 0 and conflicts harmfully with VFS_GENERIC which is also 0. The conflict is apparently harmless in the usual case when another vfs gets type number 0, because nfs is the only vfs that has sysctls. Inital fix by: Dima <dima@tejblum.dnttm.rssi.ru> Reason why it worked by: bde Notes: svn path=/head/; revision=39975
* Ignore the statically configured vfs type numbers and assign vfsBruce Evans1998-09-051-10/+12
| | | | | | | | | | | | | | type numbers in vfs attach order (modulo incomplete reuse of old numbers after vfs LKMs are unloaded). This requires reinitializing the sysctl tree (or at least the vfs subtree) for vfs's that support sysctls (currently only nfs). sysctl_order() already handled reinitialization reasonably except it checked for annulled self references in the wrong place. Fixed sysctls for vfs LKMs. Notes: svn path=/head/; revision=38869
* Staticize.Eivind Eklund1998-02-091-2/+2
| | | | Notes: svn path=/head/; revision=33181
* Simplify the lease_check stuff.Poul-Henning Kamp1997-10-261-29/+1
| | | | Notes: svn path=/head/; revision=30739
* VFS mega cleanup commit (x/N)Poul-Henning Kamp1997-10-161-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!) Notes: svn path=/head/; revision=30474
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.Poul-Henning Kamp1997-10-121-1/+3
| | | | | | | | | | | 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
* Change the M_NAMEI allocations to use the zone allocator. This changeJohn Dyson1997-09-211-1/+9
| | | | | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline. Notes: svn path=/head/; revision=29653
* 3 lines of code and updates to a number of comments.Poul-Henning Kamp1997-09-101-15/+18
| | | | | | | | Reviewed by: phk Submitted by: Terry Lambert <tlambert@primenet.com> Notes: svn path=/head/; revision=29290
* Removed unused #includes.Bruce Evans1997-08-021-8/+1
| | | | Notes: svn path=/head/; revision=27845
* Moved vfs sysctls to where Lite2 put them. No code changes yet.Bruce Evans1997-03-021-60/+1
| | | | Notes: svn path=/head/; revision=23254
* 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
* Changed `#ifdef COMPAT_PRELITE2' to `#ifndef NO_COMPAT_PRELITE2' so thatBruce Evans1997-02-181-3/+3
| | | | | | | | | | | | | the old VFS_VFSCONF sysctl is enabled by default. Initialize the vfc_vfsops field to non-NULL in sysctl_ovfs_conf() so that the old VFS_VFSCONF sysctl actually works. The old (still current) getvfsent.c uses this "kernel-only" field to decide which vfs's are configured (the old implementation returned null entries for unconfigured vfs's). Notes: svn path=/head/; revision=22872
* This is the kernel Lite/2 commit. There are some requisite userlandJohn Dyson1997-02-101-31/+75
| | | | | | | | | | | | | | | | | | 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
* From Lite2: rename fs to vfs.Jeffrey Hsu1996-03-111-4/+4
| | | | | | | Reviewed by: davidg & bde Notes: svn path=/head/; revision=14499
* Staticize.Poul-Henning Kamp1995-12-171-4/+4
| | | | | | | | | | | | | | | Unstaticize a function in scsi/scsi_base that was used, with an undocumented option. My last count on the LINT kernel shows: Total symbols: 3647 unref symbols: 463 undef symbols: 4 1 ref symbols: 1751 2 ref symbols: 485 Approaching the pain threshold now. Notes: svn path=/head/; revision=12913
* A major sweep over the sysctl stuff.Poul-Henning Kamp1995-12-041-2/+2
| | | | | | | | | | | | | | | | Move a lot of variables home to their own code (In good time before xmas :-) Introduce the string descrition of format. Add a couple more functions to poke into these marvels, while I try to decide what the correct interface should look like. Next is adding vars on the fly, and sysctl looking at them too. Removed a tine bit of defunct and #ifdefed notused code in swapgeneric. Notes: svn path=/head/; revision=12623
* Oops, the last commit left a redundant declaration.Bruce Evans1995-12-031-3/+1
| | | | Notes: svn path=/head/; revision=12606
* Completed function declarations and/or added prototypes.Bruce Evans1995-12-021-2/+3
| | | | Notes: svn path=/head/; revision=12577
* Finished (?) cleaning up sysinit stuff.Bruce Evans1995-12-021-7/+5
| | | | Notes: svn path=/head/; revision=12569
* Mega commit for sysctl.Poul-Henning Kamp1995-11-201-56/+16
| | | | | | | | | Convert the remaining sysctl stuff to the new way of doing things. the devconf stuff is the reason for the large number of files. Cleaned up some compiler warnings while I were there. Notes: svn path=/head/; revision=12429
* Introduced a type `vop_t' for vnode operation functions and usedBruce Evans1995-11-091-8/+8
| | | | | | | | | | | | | | | | | | it 1138 times (:-() in casts and a few more times in declarations. This change is null for the i386. The type has to be `typedef int vop_t(void *)' and not `typedef int vop_t()' because `gcc -Wstrict-prototypes' warns about the latter. Since vnode op functions are called with args of different (struct pointer) types, neither of these function types is any use for type checking of the arg, so it would be preferable not to use the complete function type, especially since using the complete type requires adding 1138 casts to avoid compiler warnings and another 40+ casts to reverse the function pointer conversions before calling the functions. Notes: svn path=/head/; revision=12158
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofDavid Greenman1995-09-091-4/+4
| | | | | | | compiler warnings. Notes: svn path=/head/; revision=10653
* Reviewed by: julian with quick glances by bruce and othersJulian Elischer1995-08-281-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file. Notes: svn path=/head/; revision=10358
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-4/+4
| | | | Notes: svn path=/head/; revision=8876
* Actually implement the functionality documented in sysctl.h for type CTL_FS.Garrett Wollman1994-10-201-1/+13
| | | | | | | | (Namely, call a filesystem-dependent sysctl function analogous to how it works for networking and (now) physical devices.) Notes: svn path=/head/; revision=3731
* Cosmetics: added ()'s and fixed prinf-formats to make gcc silent.Poul-Henning Kamp1994-10-081-3/+3
| | | | Notes: svn path=/head/; revision=3441
* Make NFS loadable.Garrett Wollman1994-09-221-1/+9
| | | | Notes: svn path=/head/; revision=2997
* mount.h: Declare getvfs* functions from libc.Garrett Wollman1994-09-221-2/+2
| | | | | | | vfs_init.c: Fix fs_sysctl() so that getvfs* functions actually work. Notes: svn path=/head/; revision=2962
* Implemented loadable VFS modules, and made most existing filesystemsGarrett Wollman1994-09-211-12/+91
| | | | | | | loadable. (NFS is a notable exception.) Notes: svn path=/head/; revision=2946
* Fix up some sloppy coding practices:Garrett Wollman1994-08-181-1/+2
| | | | | | | | | | | | | | | - Delete redundant declarations. - Add -Wredundant-declarations to Makefile.i386 so they don't come back. - Delete sloppy COMMON-style declarations of uninitialized data in header files. - Add a few prototypes. - Clean up warnings resulting from the above. NB: ioconf.c will still generate a redundant-declaration warning, which is unavoidable unless somebody volunteers to make `config' smarter. Notes: svn path=/head/; revision=2112