aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
Commit message (Collapse)AuthorAgeFilesLines
...
* Remember folks, it's:Mike Smith1999-10-123-0/+3
| | | | | | | | | | | 1) test 2) commit 3) test again Guess who forgot 1 and 3? 8) Notes: svn path=/head/; revision=52146
* remove unused #includePoul-Henning Kamp1999-10-113-3/+0
| | | | Notes: svn path=/head/; revision=52136
* Remove the D_NOCLUSTER[RW] options which were added because vn hadPoul-Henning Kamp1999-09-302-28/+0
| | | | | | | | problems. Now that Matt has fixed vn, this can go. The vn driver should have used d_maxio (now si_iosize_max) anyway. Notes: svn path=/head/; revision=51808
* Remove v_maxio from struct vnode.Poul-Henning Kamp1999-09-292-4/+2
| | | | | | | | | Replace it with mnt_iosize_max in struct mount. Nits from: bde Notes: svn path=/head/; revision=51797
* Introduce ttyread() and ttywrite() which do the canonical thing.Poul-Henning Kamp1999-09-282-103/+5
| | | | | | | | | Use them in many tty drivers. Reviewed by: julian, bde Notes: svn path=/head/; revision=51756
* Remove five now unused fields from struct cdevsw. They should neverPoul-Henning Kamp1999-09-252-10/+0
| | | | | | | | | | | have been there in the first place. A GENERIC kernel shrinks almost 1k. Add a slightly different safetybelt under nostop for tty drivers. Add some missing FreeBSD tags Notes: svn path=/head/; revision=51658
* This patch clears the way for removing a number of tty relatedPoul-Henning Kamp1999-09-252-50/+12
| | | | | | | | | | | | | | | | | | | | | | | | fields in struct cdevsw: d_stop moved to struct tty. d_reset already unused. d_devtotty linkage now provided by dev_t->si_tty. These fields will be removed from struct cdevsw together with d_params and d_maxio Real Soon Now. The changes in this patch consist of: initialize dev->si_tty in *_open() initialize tty->t_stop remove devtotty functions rename ttpoll to ttypoll a few adjustments to these changes in the generic code a bump of __FreeBSD_version add a couple of FreeBSD tags Notes: svn path=/head/; revision=51654
* More removals of vnode->v_lastr, replaced by preexisting seqcountMatthew Dillon1999-09-202-4/+6
| | | | | | | | | | | | heuristic to detect sequential operation. VM-related forced clustering code removed from ufs in preparation for a commit to vm/vm_fault.c that does it more generally. Reviewed by: David Greenman <dg@root.com>, Alan Cox <alc@cs.rice.edu> Notes: svn path=/head/; revision=51486
* Fix a harmless bug I introduced, simplify a bit more while here.Poul-Henning Kamp1999-09-202-12/+8
| | | | Notes: svn path=/head/; revision=51483
* Step one of replacing devsw->d_maxio with si_bsize_max.Poul-Henning Kamp1999-09-202-70/+8
| | | | | | | | | | | Rename dev->si_bsize_max to si_iosize_max and set it in spec_open if the device didn't. Set vp->v_maxio from dev->si_bsize_max in spec_open rather than in ufs_bmap.c Notes: svn path=/head/; revision=51479
* Seperate the export check in VFS_FHTOVP, exports are now checked viaAlfred Perlstein1999-09-112-14/+10
| | | | | | | | | | | | 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
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2853-53/+53
| | | | Notes: svn path=/head/; revision=50477
* Introduce vn_isdisk(struct vnode *vp) function, and use it to test for diskness.Poul-Henning Kamp1999-08-252-10/+2
| | | | Notes: svn path=/head/; revision=50347
* Oops, the previous commit was missing a new include.Bruce Evans1999-08-232-0/+2
| | | | Notes: svn path=/head/; revision=50260
* Initialise fsids with (user) device numbers again. Bitrot when dev_t'sBruce Evans1999-08-232-2/+2
| | | | | | | | were changed to pointers was obscured by casting dev_t's to longs. fsids haven't even been comprised of longs since the Lite2 merge. Notes: svn path=/head/; revision=50256
* Convert DEVFS hooks in (most) drivers to make_dev().Poul-Henning Kamp1999-08-232-94/+31
| | | | | | | | | | | | | | | | | | | Diskslice/label code not yet handled. Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers) Add the correct hook for devfs to kern_conf.c The net result of this excercise is that a lot less files depends on DEVFS, and devtoname() gets more sensible output in many cases. A few drivers had minor additional cleanups performed relating to cdevsw registration. A few drivers don't register a cdevsw{} anymore, but only use make_dev(). Notes: svn path=/head/; revision=50254
* Use devtoname() to print dev_t's instead of casting them to long or u_longBruce Evans1999-08-232-4/+4
| | | | | | | for misprinting in %lx format. Notes: svn path=/head/; revision=50253
* The bdevsw() and cdevsw() are now identical, so kill the former.Poul-Henning Kamp1999-08-134-22/+22
| | | | Notes: svn path=/head/; revision=49679
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,Poul-Henning Kamp1999-08-084-8/+2
| | | | | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part. Notes: svn path=/head/; revision=49535
* Don't set IN_ACCESS for requests to read 0 bytes or for unsuccessful reads.Bruce Evans1999-07-252-4/+8
| | | | | | | | | Translated from: similar fixes in ufs_readwrite.c rev.1.61. Things are simpler (but annoyingly different) here because there are no vm optimisations. Notes: svn path=/head/; revision=49074
* Create the macro DOINGASYNC to check whether the MNT_ASYNC flag hasKirk McKusick1999-07-132-2/+4
| | | | | | | | | | | | been set for a mount point. Insert missing checks to ensure that all write operations are done asynchronously when the MNT_ASYNC option has been requested. Submitted by: Craig A Soules <soules+@andrew.cmu.edu> Reviewed by: Kirk McKusick <mckusick@mckusick.com> Notes: svn path=/head/; revision=48801
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingKirk McKusick1999-06-264-6/+4
| | | | | | | | | | lockmgr locks. This commit should be functionally equivalent to the old semantics. That is, all buffer locking is done with LK_EXCLUSIVE requests. Changes to take advantage of LK_SHARED and LK_RECURSIVE will be done in future commits. Notes: svn path=/head/; revision=48225
* Add a vnode argument to VOP_BWRITE to get rid of the last vnodeKirk McKusick1999-06-162-8/+8
| | | | | | | | operator special case. Delete special case code from vnode_if.sh, vnode_if.src, umap_vnops.c, and null_vnops.c. Notes: svn path=/head/; revision=47964
* Simplify cdevsw registration.Poul-Henning Kamp1999-05-314-40/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* This commit should be a extensive NO-OP:Poul-Henning Kamp1999-05-302-14/+42
| | | | | | | | | | | | | | | | Reformat and initialize correctly all "struct cdevsw". Initialize the d_maj and d_bmaj fields. The d_reset field was not removed, although it is never used. I used a program to do most of this, so all the files now use the same consistent format. Please keep it that way. Vinum and i4b not modified, patches emailed to respective authors. Notes: svn path=/head/; revision=47625
* Fixed printing of a dev_t in a panic message. Fixed the function nameBruce Evans1999-05-132-4/+4
| | | | | | | in this message. Notes: svn path=/head/; revision=47099
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledPoul-Henning Kamp1999-05-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix some of the places where too much inside knowledge about major/minorPoul-Henning Kamp1999-05-082-8/+6
| | | | | | | layout and dev_t structure is being (ab)used. Notes: svn path=/head/; revision=46679
* I got tired of seeing all the cdevsw[major(foo)] all over the place.Poul-Henning Kamp1999-05-084-22/+22
| | | | | | | | | | | 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-074-22/+22
| | | | | | | | | | | | | | | | | 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
* Add an additional probe, hopefully allowing me to distinguishBrian Somers1999-05-031-6/+10
| | | | | | | | between the PC/Xi and PC/Xem boards. Now all I need is for someone with a PC/Xem to tell me what the probe says.... Notes: svn path=/head/; revision=46355
* The VFS/BIO subsystem contained a number of hacks in order to optimizeAlan Cox1999-05-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | piecemeal, middle-of-file writes for NFS. These hacks have caused no end of trouble, especially when combined with mmap(). I've removed them. Instead, NFS will issue a read-before-write to fully instantiate the struct buf containing the write. NFS does, however, optimize piecemeal appends to files. For most common file operations, you will not notice the difference. The sole remaining fragment in the VFS/BIO system is b_dirtyoff/end, which NFS uses to avoid cache coherency issues with read-merge-write style operations. NFS also optimizes the write-covers-entire-buffer case by avoiding the read-before-write. There is quite a bit of room for further optimization in these areas. The VM system marks pages fully-valid (AKA vm_page_t->valid = VM_PAGE_BITS_ALL) in several places, most noteably in vm_fault. This is not correct operation. The vm_pager_get_pages() code is now responsible for marking VM pages all-valid. A number of VM helper routines have been added to aid in zeroing-out the invalid portions of a VM page prior to the page being marked all-valid. This operation is necessary to properly support mmap(). The zeroing occurs most often when dealing with file-EOF situations. Several bugs have been fixed in the NFS subsystem, including bits handling file and directory EOF situations and buf->b_flags consistancy issues relating to clearing B_ERROR & B_INVAL, and handling B_DONE. getblk() and allocbuf() have been rewritten. B_CACHE operation is now formally defined in comments and more straightforward in implementation. B_CACHE for VMIO buffers is based on the validity of the backing store. B_CACHE for non-VMIO buffers is based simply on whether the buffer is B_INVAL or not (B_CACHE set if B_INVAL clear, and vise-versa). biodone() is now responsible for setting B_CACHE when a successful read completes. B_CACHE is also set when a bdwrite() is initiated and when a bwrite() is initiated. VFS VOP_BWRITE routines (there are only two - nfs_bwrite() and bwrite()) are now expected to set B_CACHE. This means that bowrite() and bawrite() also set B_CACHE indirectly. There are a number of places in the code which were previously using buf->b_bufsize (which is DEV_BSIZE aligned) when they should have been using buf->b_bcount. These have been fixed. getblk() now clears B_DONE on return because the rest of the system is so bad about dealing with B_DONE. Major fixes to NFS/TCP have been made. A server-side bug could cause requests to be lost by the server due to nfs_realign() overwriting other rpc's in the same TCP mbuf chain. The server's kernel must be recompiled to get the benefit of the fixes. Submitted by: Matthew Dillon <dillon@apollo.backplane.com> Notes: svn path=/head/; revision=46349
* s/size == 0;/size = 0;/Peter Wemm1999-05-022-6/+6
| | | | | | | | PR: 11409 Submitted by: Christopher Peterson <cpeterso@cs.washington.edu> Notes: svn path=/head/; revision=46338
* This Implements the mumbled about "Jail" feature.Poul-Henning Kamp1999-04-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/ Notes: svn path=/head/; revision=46155
* s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/.Dmitrij Tejblum1999-04-282-4/+4
| | | | | | | (Edited automatically) Notes: svn path=/head/; revision=46153
* Suser() simplification:Poul-Henning Kamp1999-04-274-10/+10
| | | | | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code. Notes: svn path=/head/; revision=46112
* Fix so that this driver works again when compiled with EGCS (whichDavid Nugent1999-04-221-31/+31
| | | | | | | | apparently has a much better optimiser, requiring 'volatile' memory to be declared as such). Notes: svn path=/head/; revision=45938
* Remove unused function int fi() {return 0;}Eivind Eklund1999-04-111-4/+1
| | | | Notes: svn path=/head/; revision=45581
* Staticize.Eivind Eklund1999-04-111-2/+2
| | | | Notes: svn path=/head/; revision=45580
* Make NDGBPORTS an official option.Joerg Wunsch1999-03-131-1/+2
| | | | Notes: svn path=/head/; revision=44722
* Don't depend on <ufs/ufs/quota.h> or another (old) prerequisite includingBruce Evans1999-03-062-2/+4
| | | | | | | | <sys/queue.h>. This fixes my recent breakage of biosboot by unpolluting <ufs/ufs/quota.h> in the !KERNEL case. Notes: svn path=/head/; revision=44512
* Merge patch to ufs_vnops.c's ufs_rename to the copy of ufs_rename thatWarner Losh1999-03-022-0/+10
| | | | | | | | | lives in ext2_vnops.c for ext2fs. Also remove cast from comparision. Bruce pointed out that it was bogus since we'd force a signed comparision when we really wanted an unsigned comparison. Notes: svn path=/head/; revision=44395
* Added a used #include (don't depend on "vnode_if.h" including <sys/buf.h>).Bruce Evans1999-02-252-0/+2
| | | | Notes: svn path=/head/; revision=44272
* Use suser() to check for super user rather than examining cr_uid directly.Poul-Henning Kamp1999-01-302-4/+6
| | | | | | | | | Use TTYDEF_SPEED rather than 9600 a couple of places. Reviewed by: bde, with a few grumbles. Notes: svn path=/head/; revision=43425
* Fixed parenthesization botch in previous commit. Async update of inodesBruce Evans1999-01-292-2/+2
| | | | | | | was broken. Notes: svn path=/head/; revision=43395
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-282-4/+4
| | | | | | | kernel compile Notes: svn path=/head/; revision=43311
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-272-4/+4
| | | | | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines. Notes: svn path=/head/; revision=43309
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-2718-124/+124
| | | | | | | kernel compile Notes: svn path=/head/; revision=43301
* Remove LKM support, src/lkm that built it is gone and it never worked as anPeter Wemm1999-01-171-35/+1
| | | | | | | LKM anyway. It does work as a preloaded KLD module though. Notes: svn path=/head/; revision=42764
* Avoid warning for unused variable.Eivind Eklund1999-01-112-4/+4
| | | | Notes: svn path=/head/; revision=42539