aboutsummaryrefslogtreecommitdiff
path: root/sys/miscfs/devfs
Commit message (Collapse)AuthorAgeFilesLines
* MFC vfs_bio.c 1.269 and friends. This MFC's the better launder limitingMatthew Dillon2000-12-301-0/+2
| | | | | | | solution. See commitlogs/sys '2000/12/26 11:41:38 PST' Notes: svn path=/stable/4/; revision=70504
* MFC: $FreeBSD$Peter Wemm2000-08-033-0/+6
| | | | Notes: svn path=/stable/4/; revision=64172
* MFC: Remove MAX_PERF with extreme prejudice.Paul Saab2000-03-171-2/+0
| | | | Notes: svn path=/stable/4/; revision=58160
* Give vn_isdisk() a second argument where it can return a suitable errno.Poul-Henning Kamp2000-01-101-1/+1
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=55756
* Eliminate unused variablesEivind Eklund1999-12-201-3/+1
| | | | Notes: svn path=/head/; revision=54907
* Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson1999-12-191-1/+3
| | | | | | | | | | 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
* Introduce NDFREE (and remove VOP_ABORTOP)Eivind Eklund1999-12-151-22/+0
| | | | Notes: svn path=/head/; revision=54655
* Lock reporting and assertion changes.Eivind Eklund1999-12-111-1/+1
| | | | | | | | | | | | | | | | | | * lockstatus() and VOP_ISLOCKED() gets a new process argument and a new return value: LK_EXCLOTHER, when the lock is held exclusively by another process. * The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them * Extend the vnode_if.src format to allow more exact specification than locked/unlocked. This commit should not do any semantic changes unless you are using DEBUG_VFS_LOCKS. Discussed with: grog, mch, peter, phk Reviewed by: peter Notes: svn path=/head/; revision=54444
* Remove unused #includes.Poul-Henning Kamp1999-12-081-3/+0
| | | | | | | Obtained from: http://bogon.freebsd.dk/include Notes: svn path=/head/; revision=54292
* Report swapdevices as cdevs rather than bdevs.Poul-Henning Kamp1999-11-291-0/+2
| | | | | | | Remove unused dev2budev() function. Notes: svn path=/head/; revision=53899
* s/p_cred->pc_ucred/p_ucred/gPoul-Henning Kamp1999-11-211-2/+2
| | | | Notes: svn path=/head/; revision=53503
* Get rid of calls to vfinddev() by doing like specfs.Poul-Henning Kamp1999-11-201-15/+7
| | | | Notes: svn path=/head/; revision=53457
* struct mountlist and struct mount.mnt_list have no business beingPoul-Henning Kamp1999-11-201-1/+1
| | | | | | | | | | | | | a CIRCLEQ. Change them to TAILQ_HEAD and TAILQ_ENTRY respectively. This removes ugly mp != (void*)&mountlist comparisons. Requested by: phk Submitted by: Jake Burkholder jake@checker.org PR: 14967 Notes: svn path=/head/; revision=53452
* Remove WILLRELE from VOP_SYMLINKEivind Eklund1999-11-131-5/+3
| | | | | | | | | Note: Previous commit to these files (except coda_vnops and devfs_vnops) that claimed to remove WILLRELE from VOP_RENAME actually removed it from VOP_MKNOD. Notes: svn path=/head/; revision=53131
* Remove the iskmemdev() function. Make it the responsibility of the mem.cPoul-Henning Kamp1999-11-071-3/+1
| | | | | | | drivers to enforce the securelevel checks. Notes: svn path=/head/; revision=52967
* useracc() the prequel:Poul-Henning Kamp1999-10-291-1/+0
| | | | | | | | | | | | | | Merge the contents (less some trivial bordering the silly comments) of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>. This puts the #defines for the vm_inherit_t and vm_prot_t types next to their typedefs. This paves the road for the commit to follow shortly: change useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE} as argument. Notes: svn path=/head/; revision=52635
* 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-48/+5
| | | | | | | | | | | | | | | | 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
* Make bdev userland access work like cdev userland access unlessPoul-Henning Kamp1999-08-301-182/+6
| | | | | | | | | | | | | the highly non-recommended option ALLOW_BDEV_ACCESS is used. (bdev access is evil because you don't get write errors reported.) Kill si_bsize_best before it kills Matt :-) Use the specfs routines rather having cloned copies in devfs. Notes: svn path=/head/; revision=50623
* Fix various trivial warnings from LINTPoul-Henning Kamp1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50523
* $Id$ -> $FreeBSD$Peter Wemm1999-08-284-4/+4
| | | | Notes: svn path=/head/; revision=50477
* Simplify the handling of VCHR and VBLK vnodes using the new dev_t:Poul-Henning Kamp1999-08-261-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the alias list a SLIST. Drop the "fast recycling" optimization of vnodes (including the returning of a prexisting but stale vnode from checkalias). It doesn't buy us anything now that we don't hardlimit vnodes anymore. Rename checkalias2() and checkalias() to addalias() and addaliasu() - which takes dev_t and udev_t arg respectively. Make the revoke syscalls use vcount() instead of VALIASED. Remove VALIASED flag, we don't need it now and it is faster to traverse the much shorter lists than to maintain the flag. vfs_mountedon() can check the dev_t directly, all the vnodes point to the same one. Print the devicename in specfs/vprint(). Remove a couple of stale LFS vnode flags. Remove unimplemented/unused LK_DRAINED; Notes: svn path=/head/; revision=50405
* Make a place to store the devfs hook for the block device, as the sameJulian Elischer1999-08-251-3/+2
| | | | | | | specinfo is used to identify both raw and block version sof a device. Notes: svn path=/head/; revision=50376
* Make DEVFS use PHK's specinfo struct as the source of dev_t and devsw.Julian Elischer1999-08-253-128/+120
| | | | | | | | | | | In lookup() however it's the other way around as we need to supply the dev_t for the vnode, so devfs still has a copy of it stashed away. Sourcing it from the vnode in the vnops however is useful as it makes a lot of the code almost the same as that in specfs. Notes: svn path=/head/; revision=50334
* Make DEVFS ops reflect some of the changes that have recently occured in theJulian Elischer1999-08-251-60/+173
| | | | | | | | | | | | | | specfs version of the same ops. Merging with phk's dev_t changes is not yet complete. i.e. devfs still uses it's own devsw pointer rather than following devsw(a_vp->v_rdev), and it's own copy of the dev_t. This fixes some broken actions re: syscons and DEVFS due to bitrot in devfs vops. Notes: svn path=/head/; revision=50330
* Devfs now adds itself to the hook that PHK supplies.Julian Elischer1999-08-241-1/+21
| | | | | | | | block devices are still not handled correctly, though a kludge may make them "ok". Notes: svn path=/head/; revision=50317
* Add the (inline) function vm_page_undirty for clearing the dirty bitmaskAlan Cox1999-08-171-3/+3
| | | | | | | | | | | of a vm_page. Use it. Submitted by: dillon Notes: svn path=/head/; revision=49945
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,Poul-Henning Kamp1999-08-081-2/+1
| | | | | | | | | 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
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingKirk McKusick1999-06-261-4/+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
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledPoul-Henning Kamp1999-05-111-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* remove b_proc from struct buf, it's (now) unused.Poul-Henning Kamp1999-05-061-3/+2
| | | | | | | Reviewed by: dillon, bde Notes: svn path=/head/; revision=46580
* This Implements the mumbled about "Jail" feature.Poul-Henning Kamp1999-04-281-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Suser() simplification:Poul-Henning Kamp1999-04-271-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
* Added a used #include (don't depend on "vnode_if.h" including <sys/buf.h>).Bruce Evans1999-02-251-1/+2
| | | | Notes: svn path=/head/; revision=44273
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-281-1/+4
| | | | | | | kernel compile Notes: svn path=/head/; revision=43311
* Fix but in devfs_strategy(). Switch cases were falling throughMatthew Dillon1999-01-271-1/+3
| | | | | | | | instead of breaking out, so a VCHR devices would run the VCHR routine and then fall through and run the VBLK routine. Fixed. Notes: svn path=/head/; revision=43310
* Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon1999-01-273-59/+63
| | | | | | | kernel compile Notes: svn path=/head/; revision=43305
* This is a rather large commit that encompasses the new swapper,Matthew Dillon1999-01-211-4/+4
| | | | | | | | | | | | | changes to the VM system to support the new swapper, VM bug fixes, several VM optimizations, and some additional revamping of the VM code. The specific bug fixes will be documented with additional forced commits. This commit is somewhat rough in regards to code cleanup issues. Reviewed by: "John S. Dyson" <root@dyson.iquest.net>, "David Greenman" <dg@root.com> Notes: svn path=/head/; revision=42957
* Remove declarations for undefined functions and a couple of unusedEivind Eklund1999-01-121-11/+1
| | | | | | | enotsupp implementations. Notes: svn path=/head/; revision=42568
* Avoid NULL-pointer dereference on error condition.Eivind Eklund1998-12-151-2/+2
| | | | Notes: svn path=/head/; revision=41834
* Rename one of the two devfs_link's to devfs_makelink.Eivind Eklund1998-12-101-2/+2
| | | | Notes: svn path=/head/; revision=41658
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs1998-12-072-14/+8
| | | | | | | and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
* Staticize.Eivind Eklund1998-11-261-2/+2
| | | | Notes: svn path=/head/; revision=41362
* Delete stray extern declaration for non-existing variables.Peter Wemm1998-11-091-2/+1
| | | | Notes: svn path=/head/; revision=41027
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagsPeter Wemm1998-10-312-6/+6
| | | | | | | rather than abusing the list next pointer with a magic number. Notes: svn path=/head/; revision=40790
* Make devfs update the atime timestamp so that 'w' works when usingSøren Schmidt1998-09-302-5/+12
| | | | | | | options DEVFS. Notes: svn path=/head/; revision=39836
* Oops, don't assume that the environment is normal in devfs_mount().Bruce Evans1998-09-081-4/+6
| | | | | | | | It isn't for the hidden mountpoint. The static vfs's haven't been attached then, so mp->mnt_vfc can't be valid. Notes: svn path=/head/; revision=38951
* Removed statically configured mount type numbers (MOUNT_*) and allBruce Evans1998-09-071-6/+6
| | | | | | | | | | | | 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
* Cosmetic changes to the PAGE_XXX macros to make them consistent withDoug Rabson1998-09-041-2/+2
| | | | | | | the other objects in vm. Notes: svn path=/head/; revision=38799
* Use [u]intptr_t instead of [u_]long for casts between pointers andBruce Evans1998-08-162-11/+10
| | | | | | | integers. Don't forget to cast to (void *) as well. Notes: svn path=/head/; revision=38354