aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
* Update to C99, s/__FUNCTION__/__func__/,David E. O'Brien2001-12-102-2/+2
| | | | | | | also don't use ANSI string concatenation. Notes: svn path=/head/; revision=87599
* Change constraints to use "+" in inline asm instead of mapping inputGiorgos Keramidas2001-11-121-1/+1
| | | | | | | | | to output parameters with "0". Reviewed by: jhb Notes: svn path=/head/; revision=86307
* Add mnt_reservedvnlist so we can MFC to 4.x, in order to make all mountMatthew Dillon2001-11-042-0/+2
| | | | | | | | | | | structure changes now rather then piecemeal later on. mnt_nvnodelist currently holds all the vnodes under the mount point. This will eventually be split into a 'dirty' and 'clean' list. This way we only break kld's once rather then twice. nvnodelist will eventually turn into the dirty list and should remain compatible with the klds. Notes: svn path=/head/; revision=86037
* Change the vnode list under the mount point from a LIST to a TAILQMatthew Dillon2001-10-232-8/+10
| | | | | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days Notes: svn path=/head/; revision=85339
* The addition of i_dirhash to struct inode pushed RELENG_4'sIan Dowse2001-09-244-6/+6
| | | | | | | | | | | | | | | | sizeof(struct inode) into a new malloc bucket on the i386. This didn't happen in -current due to the removal of i_lock, but it does no harm to apply the workaround to -current first. Reduce the size of the i_spare[] array in struct inode from 4 to 3 entries, and change ext2fs to use i_din.di_spare[1] so that it does not need i_spare[3]. Reviewed by: bde MFC after: 3 days Notes: svn path=/head/; revision=83899
* KSE Milestone 2Julian Elischer2001-09-1219-233/+234
| | | | | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha Notes: svn path=/head/; revision=83366
* Do not depend on pcb_savefpu backwards compat #define.Peter Wemm2001-07-121-1/+1
| | | | Notes: svn path=/head/; revision=79627
* Bring in dirhash, a simple hash-based lookup optimisation for largeIan Dowse2001-07-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | directories. When enabled via "options UFS_DIRHASH", in-core hash arrays are maintained for large directories. These allow all directory operations to take place quickly instead of requiring long linear searches. For now anyway, dirhash is not enabled by default. The in-core hash arrays have a memory requirement that is approximately half the size of the size of the on-disk directory file. A number of new sysctl variables allow control over which directories get hashed and over the maximum amount of memory that dirhash will use: vfs.ufs.dirhash_minsize The minimum on-disk directory size for which hashing should be used. The default is 2560 (2.5k). vfs.ufs.dirhash_maxmem The system-wide maximum total memory to be used by dirhash data structures. The default is 2097152 (2MB). The current amount of memory being used by dirhash is visible through the read-only sysctl variable vfs.ufs.dirhash_maxmem. Finally, some extra sanity checks that are enabled by default, but which may have an impact on performance, can be disabled by setting vfs.ufs.dirhash_docheck to 0. Discussed on: -fs, -hackers Notes: svn path=/head/; revision=79561
* Fix more mntvnode and vnode interlock order reversals.John Baldwin2001-06-282-4/+4
| | | | Notes: svn path=/head/; revision=78940
* Fix a mntvnode and vnode interlock reversal.John Baldwin2001-06-282-6/+8
| | | | Notes: svn path=/head/; revision=78907
* new (gpl licensed) firmware image for cs4280/cs46xx sound chipsCameron Grant2001-05-301-0/+340
| | | | Notes: svn path=/head/; revision=77503
* Remove last vestiges of MFS.Poul-Henning Kamp2001-05-292-20/+0
| | | | Notes: svn path=/head/; revision=77437
* Close the opening comment line on these two files that mysteriouly vanished.Scott Long2001-05-272-2/+2
| | | | Notes: svn path=/head/; revision=77275
* Oops. Unremove vestiges of the old, broken sound drivers. They are nowBruce Evans2001-05-243-0/+1580
| | | | | | | used in new drivers. Notes: svn path=/head/; revision=77141
* Remove vestiges of the old, broken sound drivers.Bruce Evans2001-05-243-1580/+0
| | | | Notes: svn path=/head/; revision=77134
* Change the second argument of vflush() to an integer that specifiesIan Dowse2001-05-162-4/+4
| | | | | | | | | | | | | | | | | | | | | | | the number of references on the filesystem root vnode to be both expected and released. Many filesystems hold an extra reference on the filesystem root vnode, which must be accounted for when determining if the filesystem is busy and then released if it isn't busy. The old `skipvp' approach required individual filesystem xxx_unmount functions to re-implement much of vflush()'s logic to deal with the root vnode. All 9 filesystems that hold an extra reference on the root vnode got the logic wrong in the case of forced unmounts, so `umount -f' would always fail if there were any extra root vnode references. Fix this issue centrally in vflush(), now that we can. This commit also fixes a vnode reference leak in devfs, which could result in idle devfs filesystems that refuse to unmount. Reviewed by: phk, bp Notes: svn path=/head/; revision=76688
* When running with soft updates, track the number of blocks and filesKirk McKusick2001-05-082-8/+6
| | | | | | | | | | | | | | | | that are committed to being freed and reflect these blocks in the counts returned by statfs (and thus also by the `df' command). This change allows programs such as those that do news expiration to know when to stop if they are trying to create a certain percentage of free space. Note that this change does not solve the much harder problem of making this to-be-freed space available to applications that want it (thus on a nearly full filesystem, you may still encounter out-of-space conditions even though the free space will show up eventually). Hopefully this harder problem will be the subject of a future enhancement. Notes: svn path=/head/; revision=76357
* Remove blatantly pointless call to VOP_BMAP().Poul-Henning Kamp2001-05-012-8/+2
| | | | Notes: svn path=/head/; revision=76172
* Implement vop_std{get|put}pages() and add them to the default vop[].Poul-Henning Kamp2001-05-012-64/+0
| | | | | | | | Un-copy&paste all the VOP_{GET|PUT}PAGES() functions which do nothing but the default. Notes: svn path=/head/; revision=76167
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inMark Murray2001-05-013-13/+21
| | | | | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations) Notes: svn path=/head/; revision=76166
* VOP_BALLOC was never really a VOP in the first place, so convert itPoul-Henning Kamp2001-04-292-0/+4
| | | | | | | to UFS_BALLOC like the other "between UFS and FFS function interfaces". Notes: svn path=/head/; revision=76132
* Make a panic less misleading.Poul-Henning Kamp2001-04-292-2/+2
| | | | Notes: svn path=/head/; revision=76130
* Remove two unused arguments from ufs_bmaparray().Poul-Henning Kamp2001-04-292-40/+30
| | | | Notes: svn path=/head/; revision=76128
* Revert consequences of changes to mount.h, part 2.Greg Lehey2001-04-292-4/+0
| | | | | | | Requested by: bde Notes: svn path=/head/; revision=76117
* MFffs ffs_balloc.c 1.5.Bruce Evans2001-04-252-0/+4
| | | | | | | | | | | | | | | | | | | | Long ago, bread() set b_blkno to the disk block number as a side effect of doing physical i/o (or it just retained the setting from when the i/o was done). The setting is lost when buffers go away and then are reconsituted from VM. bread() originally compensated by doing a VOP_BMAP() to recover b_blkno, but this was no good since it sometimes caused extra i/o or even deadlock for bread()ing metadata to do the bmap. This was fixed in vfs_bio.c 1.33 (1995/03/03) and ffs_balloc.c 1.5, etc., by removing the VOP_BMAP() from bread() and breadn(), and changing all (?) places that used b_blkno to set it if necessary. ext2fs was not imported until later in 1995 and was still depending on the old behaviour of bread() in at least ext2_balloc(). This caused filesystem and file corruption by clobbering direct block numbers in inodes. Notes: svn path=/head/; revision=75951
* Move the netexport structure from the fs-specific mountstructurePoul-Henning Kamp2001-04-254-8/+4
| | | | | | | | | | | | | | | | | to struct mount. This makes the "struct netexport *" paramter to the vfs_export and vfs_checkexport interface unneeded. Consequently that all non-stacking filesystems can use vfs_stdcheckexp(). At the same time, make it a pointer to a struct netexport in struct mount, so that we can remove the bogus AF_MAX and #include <net/radix.h> from <sys/mount.h> Notes: svn path=/head/; revision=75934
* Correct #includes to work with fixed sys/mount.h.Greg Lehey2001-04-232-0/+4
| | | | Notes: svn path=/head/; revision=75858
* Fixes to track snapshot copy-on-write checking in the specinfoKirk McKusick2001-03-072-2/+2
| | | | | | | | | structure rather than assuming that the device vnode would reside in the FFS filesystem (which is obviously a broken assumption with the device filesystem). Notes: svn path=/head/; revision=73942
* Grab the process lock while calling psignal and before calling psignal.John Baldwin2001-03-072-0/+4
| | | | Notes: svn path=/head/; revision=73929
* Reviewed by: jlemonAdrian Chadd2001-03-012-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An initial tidyup of the mount() syscall and VFS mount code. This code replaces the earlier work done by jlemon in an attempt to make linux_mount() work. * the guts of the mount work has been moved into vfs_mount(). * move `type', `path' and `flags' from being userland variables into being kernel variables in vfs_mount(). `data' remains a pointer into userspace. * Attempt to verify the `type' and `path' strings passed to vfs_mount() aren't too long. * rework mount() and linux_mount() to take the userland parameters (besides data, as mentioned) and pass kernel variables to vfs_mount(). (linux_mount() already did this, I've just tidied it up a little more.) * remove the copyin*() stuff for `path'. `data' still requires copyin*() since its a pointer into userland. * set `mount->mnt_statf_mntonname' in vfs_mount() rather than in each filesystem. This variable is generally initialised with `path', and each filesystem can override it if they want to. * NOTE: f_mntonname is intiailised with "/" in the case of a root mount. Notes: svn path=/head/; revision=73286
* Remove the leading underscore from all symbols defined in x86 asmJake Burkholder2001-02-259-31/+31
| | | | | | | | | | | | | | and used in C or vice versa. The elf compiler uses the same names for both. Remove asnames.h with great prejudice; it has served its purpose. Note that this does not affect the ability to generate an aout kernel due to gcc's -mno-underscores option. moral support from: peter, jhb Notes: svn path=/head/; revision=73011
* Preceed/preceeding are not english words. Use precede or preceding.Jeroen Ruigrok van der Werven2001-02-182-2/+2
| | | | Notes: svn path=/head/; revision=72640
* Change and clean the mutex lock interface.Bosko Milekic2001-02-093-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order) Notes: svn path=/head/; revision=72200
* Mechanical change to use <sys/queue.h> macro API instead ofPoul-Henning Kamp2001-02-042-8/+8
| | | | | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1) Notes: svn path=/head/; revision=71999
* Use <sys/queue.h> macro API.Poul-Henning Kamp2001-02-041-2/+2
| | | | Notes: svn path=/head/; revision=71998
* Remove a DIAGNOSTIC check which belongs in <sys/queue.h> if anyplace at all.Poul-Henning Kamp2001-02-041-4/+0
| | | | Notes: svn path=/head/; revision=71993
* Driver for the ESS Maestro3 and Allegro sound chips. Note that due to theScott Long2001-02-012-0/+906
| | | | | | | | | amount of GPL'd firmware in the driver, it will only be built as a module. Approved by: cg Notes: svn path=/head/; revision=71901
* Back out proc locking to protect p_ucred for obtaining additionalJohn Baldwin2001-01-272-48/+6
| | | | | | | references along with the actual obtaining of additional references. Notes: svn path=/head/; revision=71699
* Convert all simplelocks to mutexes and remove the simplelock implementations.Jason Evans2001-01-243-41/+36
| | | | Notes: svn path=/head/; revision=71576
* Proc locking.John Baldwin2001-01-231-0/+2
| | | | Notes: svn path=/head/; revision=71487
* Proc locking, mostly protecting p_ucred while obtaining additionalJohn Baldwin2001-01-234-10/+56
| | | | | | | references. Notes: svn path=/head/; revision=71483
* Completed move of Digiboard drivers to dev/dgbSergey Babkin2001-01-088-10303/+0
| | | | Notes: svn path=/head/; revision=70783
* Changed the copyright notice to BSD-style. The original GPL copyrightSergey Babkin2001-01-054-24/+110
| | | | | | | | was used due to confusion. Now this code should be moved out of the gnu ghetto subdirectory. Notes: svn path=/head/; revision=70676
* Avoid a data-consistency race between write() and mmap()Matthew Dillon2000-12-172-0/+18
| | | | | | | | | | | by ensuring that newly allocated blocks are zerod. The race can occur even in the case where the write covers the entire block. Reported by: Sven Berkvens <sven@berkvens.net>, Marc Olzheim <zlo@zlo.nu> Notes: svn path=/head/; revision=70131
* Put the bits in place for Alpha support for ext2. Not tested.Matt Jacob2000-12-095-0/+263
| | | | Notes: svn path=/head/; revision=69808
* Correct to a common %ld the 5 argument to a printf.Matt Jacob2000-12-092-4/+4
| | | | Notes: svn path=/head/; revision=69807
* Use a pointer to a size_t for the 4th argument to copyinstr-Matt Jacob2000-12-092-2/+2
| | | | | | | not a pointer to a u_int. Notes: svn path=/head/; revision=69806
* Backed out previous commit. Don't depend on namespace pollution inBruce Evans2000-12-024-0/+4
| | | | | | | <sys/buf.h>. Notes: svn path=/head/; revision=69517
* remove unneded sys/ucred.h includesAlfred Perlstein2000-11-304-4/+0
| | | | Notes: svn path=/head/; revision=69399
* Quick fix for not writing group descriptor group, inode bitmaps orBruce Evans2000-11-102-2/+4
| | | | | | | | | | | | | | | | block bitmaps before unmount() completes. They were written using bdwrite(), so they were normally written less than 32 seconds after unmount(), but this is too late if the media is removed or the system is rebooted soon after unmount(). sync()ing before unmount() didn't help, because ext2fs uses buggy private caching for these blocks -- it doesn't even bdwrite() them until they are uncached or the filesystem is unmounted. sync()ing after unmount() didn't help, because sync() only applies to (vnodes for) mounted filesystems. PR: 22726 Notes: svn path=/head/; revision=68568