summaryrefslogtreecommitdiff
path: root/sys/miscfs/devfs
AgeCommit message (Collapse)Author
2000-08-20 Remove all traces of Julians DEVFS (incl from kern/subr_diskslice.c)Poul-Henning Kamp
Remove old DEVFS support fields from dev_t. Make uid, gid & mode members of dev_t and set them in make_dev(). Use correct uid, gid & mode in make_dev in disk minilayer. Add support for registering alias names for a dev_t using the new function make_dev_alias(). These will show up as symlinks in DEVFS. Use makedev() rather than make_dev() for MFSs magic devices to prevent DEVFS from noticing this abuse. Add a field for DEVFS inode number in dev_t. Add new DEVFS in fs/devfs. Add devfs cloning to: disk minilayer (ie: ad(4), sd(4), cd(4) etc etc) md(4), tun(4), bpf(4), fd(4) If DEVFS add -d flag to /sbin/inits args to make it mount devfs. Add commented out DEVFS to GENERIC Notes: svn path=/head/; revision=64880
2000-08-18Introduce vop_stdinactive() and make it the default if no vop_inactivePoul-Henning Kamp
is declared. Sort and prune a few vop_op[]. Notes: svn path=/head/; revision=64819
2000-06-16Virtualizes & untangles the bioops operations vector.Poul-Henning Kamp
Ref: Message-ID: <18317.961014572@critter.freebsd.dk> To: current@ Notes: svn path=/head/; revision=61724
2000-05-05Separate the struct bio related stuff out of <sys/buf.h> intoPoul-Henning Kamp
<sys/bio.h>. <sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall not be made a nested include according to bdes teachings on the subject of nested includes. Diskdrivers and similar stuff below specfs::strategy() should no longer need to include <sys/buf.> unless they need caching of data. Still a few bogus uses of struct buf to track down. Repocopy by: peter Notes: svn path=/head/; revision=60041
2000-05-01Add $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=59874
2000-04-15Complete the bio/buf divorce for all code below devfs::strategyPoul-Henning Kamp
Exceptions: Vinum untouched. This means that it cannot be compiled. Greg Lehey is on the case. CCD not converted yet, casts to struct buf (still safe) atapi-cd casts to struct buf to examine B_PHYS Notes: svn path=/head/; revision=59249
2000-04-02Move B_ERROR flag to b_ioflags and call it BIO_ERROR.Poul-Henning Kamp
(Much of this done by script) Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED. Move b_pblkno and b_iodone_chain to struct bio while we transition, they will be obsoleted once bio structs chain/stack. Add bio_queue field for struct bio aware disksort. Address a lot of stylistic issues brought up by bde. Notes: svn path=/head/; revision=58934
2000-03-20Rename the existing BUF_STRATEGY() to DEV_STRATEGY()Poul-Henning Kamp
substitute BUF_WRITE(foo) for VOP_BWRITE(foo->b_vp, foo) substitute BUF_STRATEGY(foo) for VOP_STRATEGY(foo->b_vp, foo) This patch is machine generated except for the ccd.c and buf.h parts. Notes: svn path=/head/; revision=58349
2000-03-20Remove B_READ, B_WRITE and B_FREEBUF and replace them with a newPoul-Henning Kamp
field in struct buf: b_iocmd. The b_iocmd is enforced to have exactly one bit set. B_WRITE was bogusly defined as zero giving rise to obvious coding mistakes. Also eliminate the redundant struct buf flag B_CALL, it can just as efficiently be done by comparing b_iodone to NULL. Should you get a panic or drop into the debugger, complaining about "b_iocmd", don't continue. It is likely to write on your disk where it should have been reading. This change is a step in the direction towards a stackable BIO capability. A lot of this patch were machine generated (Thanks to style(9) compliance!) Vinum users: Greg has not had time to test this yet, be careful. Notes: svn path=/head/; revision=58345
2000-03-16Eliminate the undocumented, experimental, non-delivering and highlyPoul-Henning Kamp
dangerous MAX_PERF option. Notes: svn path=/head/; revision=58132
2000-01-10Give vn_isdisk() a second argument where it can return a suitable errno.Poul-Henning Kamp
Suggested by: bde Notes: svn path=/head/; revision=55756
1999-12-20Eliminate unused variablesEivind Eklund
Notes: svn path=/head/; revision=54907
1999-12-19Second pass commit to introduce new ACL and Extended Attribute systemRobert Watson
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
1999-12-15Introduce NDFREE (and remove VOP_ABORTOP)Eivind Eklund
Notes: svn path=/head/; revision=54655
1999-12-11Lock reporting and assertion changes.Eivind Eklund
* 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
1999-12-08Remove unused #includes.Poul-Henning Kamp
Obtained from: http://bogon.freebsd.dk/include Notes: svn path=/head/; revision=54292
1999-11-29Report swapdevices as cdevs rather than bdevs.Poul-Henning Kamp
Remove unused dev2budev() function. Notes: svn path=/head/; revision=53899
1999-11-21s/p_cred->pc_ucred/p_ucred/gPoul-Henning Kamp
Notes: svn path=/head/; revision=53503
1999-11-20Get rid of calls to vfinddev() by doing like specfs.Poul-Henning Kamp
Notes: svn path=/head/; revision=53457
1999-11-20struct mountlist and struct mount.mnt_list have no business beingPoul-Henning Kamp
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
1999-11-13Remove WILLRELE from VOP_SYMLINKEivind Eklund
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
1999-11-07Remove the iskmemdev() function. Make it the responsibility of the mem.cPoul-Henning Kamp
drivers to enforce the securelevel checks. Notes: svn path=/head/; revision=52967
1999-10-29useracc() the prequel:Poul-Henning Kamp
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
1999-09-11Seperate the export check in VFS_FHTOVP, exports are now checked viaAlfred Perlstein
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
1999-09-07All unimplemented VFS ops now have entries in kern/vfs_default.c that returnAlfred Perlstein
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
1999-08-30Make bdev userland access work like cdev userland access unlessPoul-Henning Kamp
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
1999-08-28Fix various trivial warnings from LINTPoul-Henning Kamp
Notes: svn path=/head/; revision=50523
1999-08-28$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50477
1999-08-26Simplify the handling of VCHR and VBLK vnodes using the new dev_t:Poul-Henning Kamp
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
1999-08-25Make a place to store the devfs hook for the block device, as the sameJulian Elischer
specinfo is used to identify both raw and block version sof a device. Notes: svn path=/head/; revision=50376
1999-08-25Make DEVFS use PHK's specinfo struct as the source of dev_t and devsw.Julian Elischer
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
1999-08-25Make DEVFS ops reflect some of the changes that have recently occured in theJulian Elischer
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
1999-08-24Devfs now adds itself to the hook that PHK supplies.Julian Elischer
block devices are still not handled correctly, though a kludge may make them "ok". Notes: svn path=/head/; revision=50317
1999-08-17Add the (inline) function vm_page_undirty for clearing the dirty bitmaskAlan Cox
of a vm_page. Use it. Submitted by: dillon Notes: svn path=/head/; revision=49945
1999-08-08Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,Poul-Henning Kamp
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
1999-06-26Convert buffer locking from using the B_BUSY and B_WANTED flags to usingKirk McKusick
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
1999-05-11Divorce "dev_t" from the "major|minor" bitmap, which is now calledPoul-Henning Kamp
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
1999-05-06remove b_proc from struct buf, it's (now) unused.Poul-Henning Kamp
Reviewed by: dillon, bde Notes: svn path=/head/; revision=46580
1999-04-28This Implements the mumbled about "Jail" feature.Poul-Henning Kamp
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
1999-04-27Suser() simplification:Poul-Henning Kamp
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
1999-02-25Added a used #include (don't depend on "vnode_if.h" including <sys/buf.h>).Bruce Evans
Notes: svn path=/head/; revision=44273
1999-01-28 Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon
kernel compile Notes: svn path=/head/; revision=43311
1999-01-27 Fix but in devfs_strategy(). Switch cases were falling throughMatthew Dillon
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
1999-01-27 Fix warnings in preparation for adding -Wall -Wcast-qual to theMatthew Dillon
kernel compile Notes: svn path=/head/; revision=43305
1999-01-21 This is a rather large commit that encompasses the new swapper,Matthew Dillon
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
1999-01-12Remove declarations for undefined functions and a couple of unusedEivind Eklund
enotsupp implementations. Notes: svn path=/head/; revision=42568
1998-12-15Avoid NULL-pointer dereference on error condition.Eivind Eklund
Notes: svn path=/head/; revision=41834
1998-12-10Rename one of the two devfs_link's to devfs_makelink.Eivind Eklund
Notes: svn path=/head/; revision=41658
1998-12-07The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticArchie Cobbs
and local variables, goto labels, and functions declared but not defined. Notes: svn path=/head/; revision=41591
1998-11-26Staticize.Eivind Eklund
Notes: svn path=/head/; revision=41362