summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_init.c
Commit message (Collapse)AuthorAgeFilesLines
* Back out M_* changes, per decision of the TRB.imp2003-02-191-8/+8
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-8/+8
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* We don't need to check the return value of malloc() againstmux2002-06-221-14/+0
| | | | NULL when the M_WAITOK flag is specified.
* More s/file system/filesystem/gtrhodes2002-05-161-4/+4
|
* These are Alexander Kabaev's VFSops fixes (see the thread 'Found: moduledillon2002-04-301-21/+82
| | | | | | | | | | | | | | | | | loading breakage'). The patch fixes serious issues with the VFS operations vector array which results in a crash when a filesystem module adding a new VOP is loaded into the kernel. Basically what was happening before was that the old operations vector was being freed and a new one allocated. The original MALLOC code tended to reuse the same address for the case and so the bug did not rear its ugly head until the new memory subsystem was emplaced. This patch replaces the temporary workaround Dave O'Brien comitted in 1.58. The patch is clean enough that I intend to MFC it to stable at some point. Submitted by: Alexander Kabaev <ak03@gte.com> MFC after: 1 week
* Commit work-around for panics when mounting FS's that are auto-loaded asobrien2002-03-251-0/+2
| | | | | | | | | | | | | | | modules (ie. procfs.ko). When the kernel loads dynamic filesystem module, it looks for any of the VOP operations specified by the new filesystem that have not been registered already by the currently known filesystems. If any of such operations exist, vfs_add_vnops function calls vfs_opv_recalc function, which rebuilds vop_t vectors for each filesystem and sets all global pointers like ufs_vnops_p, devfs_specop_p, etc to the new values and then frees the old pointers. This behavior is bad because there might be already active vnodes whose v_op fields will be left pointing to the random garbage, leading to inevitable crash soon. Submitted by: Alexander Kabaev <ak03@gte.com>
* Remove references to vm_zone.h and switch over to the new uma API.jeff2002-03-201-1/+0
| | | | | Also, remove maxsockets. If you look carefully you'll notice that the old zone allocator never honored this anyway.
* Document all functions, global and static variables, and sysctls.eivind2002-03-051-1/+23
| | | | | | | | Includes some minor whitespace changes, and re-ordering to be able to document properly (e.g, grouping of variables and the SYSCTL macro calls for them, where the documentation has been added.) Reviewed by: phk (but all errors are mine)
* Revert consequences of changes to mount.h, part 2.grog2001-04-291-2/+0
| | | | Requested by: bde
* Correct #includes to work with fixed sys/mount.h.grog2001-04-231-0/+2
|
* Another round of the <sys/queue.h> FOREACH transmogriffer.phk2001-02-041-2/+1
| | | | | Created with: sed(1) Reviewed by: md5(1)
* Convert more malloc+bzero to malloc+M_ZERO.dwmalone2000-12-081-2/+2
| | | | | Submitted by: josh@zipperup.org Submitted by: Robert Drehmel <robd@gmx.net>
* Untangle vfsinit() a bit. Use seperate sysinit functions rather thanpeter2000-12-061-23/+2
| | | | having a super-function calling bits all over the place.
* Do not panic on an uninitialized VOP_xxx() call. This was meant as apeter2000-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
* The sysctl mod_xx hack is no longer required now that we have totallypeter1999-12-121-10/+0
| | | | dynamic sysctl registration.
* Move a couple of globals here where they are initialised, rather thanmsmith1999-11-011-0/+7
| | | | orphaning them in vfs_conf.c
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Removed references to a nonexistent variable. This fixes building kernelsbde1999-07-291-4/+1
| | | | without -O.
* * Register sysctl nodes before running sysinits when loading files anddfr1999-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
* * Change sysctl from using linker_set to construct its tree using SLISTs.dfr1999-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)
* Fix warnings related to -Wall -Wcast-qualdillon1999-01-281-2/+2
|
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-281-12/+12
| | | | kernel compile
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-071-6/+2
| | | | and local variables, goto labels, and functions declared but not defined.
* Fixed the type of vfs_modevent (a little late, to match the correspondingbde1998-11-151-2/+2
| | | | change in sys/mount.h).
* Make the vnode opv vector construction fully dynamic. Previously wepeter1998-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)
* General tidy up: remove more unused code, update comments, simplify somepeter1998-11-041-34/+16
| | | | routines a little.
* Nitpicking and dusting performed on a train. Removes trivial warningsphk1998-10-251-12/+2
| | | | about unused variables, labels and other lint.
* Fixed sysctl attachment for statically configured vfs's.bde1998-10-251-16/+25
| | | | Broken in: previous commit
* *gulp*. Jordan specifically OK'ed this..peter1998-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.
* Taking the GENERIC kernel and commenting out MSDOSFS, CD9660{,_ROOT}, PROCFS,obrien1998-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
* Ignore the statically configured vfs type numbers and assign vfsbde1998-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.
* Staticize.eivind1998-02-091-2/+2
|
* Simplify the lease_check stuff.phk1997-10-261-29/+1
|
* VFS mega cleanup commit (x/N)phk1997-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!)
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-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
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-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.
* 3 lines of code and updates to a number of comments.phk1997-09-101-15/+18
| | | | | Reviewed by: phk Submitted by: Terry Lambert <tlambert@primenet.com>
* Removed unused #includes.bde1997-08-021-8/+1
|
* Moved vfs sysctls to where Lite2 put them. No code changes yet.bde1997-03-021-60/+1
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Changed `#ifdef COMPAT_PRELITE2' to `#ifndef NO_COMPAT_PRELITE2' so thatbde1997-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).
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-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>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* From Lite2: rename fs to vfs.hsu1996-03-111-4/+4
| | | | Reviewed by: davidg & bde
* Staticize.phk1995-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.
* A major sweep over the sysctl stuff.phk1995-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.
* Oops, the last commit left a redundant declaration.bde1995-12-031-3/+1
|
* Completed function declarations and/or added prototypes.bde1995-12-021-2/+3
|
* Finished (?) cleaning up sysinit stuff.bde1995-12-021-7/+5
|
* Mega commit for sysctl.phk1995-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.
OpenPOWER on IntegriCloud