summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* This commit should be a extensive NO-OP:phk1999-05-301-6/+21
| | | | | | | | | | | | | 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.
* Don't call calcru() on a swapped-out process. calcru() access p_stats, whichdt1999-05-221-16/+10
| | | | is in U-area.
* Driver is now ported to NetBSD.semenu1999-05-1212-116/+251
| | | | Submitted by: Christos Zoulas <christos@zoulas.com>
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-1112-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* remove cast from dev_t to dev_t.phk1999-05-091-2/+11
|
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-084-31/+37
| | | | | | | | 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.
* The lowercasing of Joliet filenames was not a feature.dcs1999-05-081-2/+2
|
* Continue where Julian left off in July 1998:phk1999-05-073-19/+19
| | | | | | | | | | | | | | 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.)
* One too many vfsops..peter1999-05-061-2/+1
|
* remove b_proc from struct buf, it's (now) unused.phk1999-05-061-3/+2
| | | | Reviewed by: dillon, bde
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-062-5/+6
| | | | if/else nesting.
* Make the type and map files claim 0 bytes size. Tar doesn't get confusedphk1999-05-041-13/+10
| | | | | | now, but doesn't store any data eiter. I wonder if we shouldn't claim to be fifos instead...
* Add even more () to CHECKIO which by now feels positively LISPish.phk1999-05-041-3/+4
| | | | | Submitted by: bde Reviewed by: phk
* Add a new "file" to procfs: "rlimit" which shows the resource limits forphk1999-04-304-4/+188
| | | | | | | | the process. PR: 11342 Submitted by: Adrian Chadd adrian@freebsd.org Reviewed by: phk
* This Implements the mumbled about "Jail" feature.phk1999-04-284-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/
* Change suser_xxx() to suser() where it applies.phk1999-04-271-4/+5
|
* Suser() simplification:phk1999-04-276-17/+16
| | | | | | | | | | | | | | | | | | | 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.
* Removed annoying messaged during boot,added some checksemenu1999-04-207-177/+434
| | | | | | | | before mounting (should help to do not mount extended partitions:-). Fixed problem with hanging while unmounting busy fs. And (the most important) added some locks to prevent simulaneous access to kernel structures!
* Add support for Joliet extensions to the iso9660 fs. The related PRdcs1999-04-187-82/+224
| | | | | | | | | | | | | cannot yet be closed, though. I hope I got all credits right, and that the multiple submitted by lines do not break anyone's scripts... PR: kern/5038, kern/5567 Submitted by: Keith Jang <keith@email.gcn.net.tw> Submitted by: Joachim Kuebart <joki@kuebart.stuttgart.netsurf.de> Submitted by: Byung Yang <byung@wam.umd.edu> Submitted by: Motomichi Matsuzaki <mzaki@e-mail.ne.jp>
* Removed DIAGNOSTIC opion redefinition.semenu1999-04-131-2/+1
| | | | Submitted by: Eivind Eklund <eivind@FreeBSD.org>
* Catch a case spotted by Tor where files mmapped could leave garbage in thejulian1999-04-051-3/+13
| | | | | | | | | | | | unallocated parts of the last page when the file ended on a frag but not a page boundary. Delimitted by tags PRE_MATT_MMAP_EOF and POST_MATT_MMAP_EOF, in files alpha/alpha/pmap.c i386/i386/pmap.c nfs/nfs_bio.c vm/pmap.h vm/vm_page.c vm/vm_page.h vm/vnode_pager.c miscfs/specfs/spec_vnops.c ufs/ufs/ufs_readwrite.c kern/vfs_bio.c Submitted by: Matt Dillon <dillon@freebsd.org> Reviewed by: Alan Cox <alc@freebsd.org>
* Back out half of 1.32: don't print a message on every failed mount attempt.dt1999-03-281-3/+1
| | | | | It is too chatty and hardly useful. 2 mesages in somewhat usual cases are left for now.
* Don't allow anyone except root to mount file systems that map uids.imp1999-03-121-1/+7
| | | | | | | | | This can have bad security implications, but the impact on FreeBSD systems is minimal because this fs isn't in the default kernels and it is unknown if it even works. Submitted by: Manuel Bouyer <bouyer@antioche.eu.org> and Artur Grabowski <art@stacken.kth.se>
* This code got moved as a result of confusion between union mounts andpeter1999-02-281-10/+1
| | | | | unionfs. Julian has already revived the union mount part of this move in vfs_syscalls.c rev 1.119, but forgot to take it out of here.
* Reviewed by: Julian Elischer <julian@whistle.com>dillon1999-02-251-23/+42
| | | | | | | Add d_parms() to {c,b}devsw[]. If non-NULL this function points to a device routine that will properly fill in the specinfo structure. vfs_subr.c's checkalias() supplies appropriate defaults. This change should be fully backwards compatible with existing devices.
* Hide access to vmspace:vm_pmap with inline function vmspace_pmap(). Thisluoqi1999-02-191-2/+2
| | | | | | | is the preparation step for moving pmap storage out of vmspace proper. Reviewed by: Alan Cox <alc@cs.rice.edu> Matthew Dillion <dillon@apollo.backplane.com>
* Added limited write ability. Now we can use some kindsemenu1999-02-1911-552/+874
| | | | of files for swap holders. See mount_ntfs..8 for details.
* Remove MAP_ENTRY_IS_A_MAP 'share' maps. These maps were once used todillon1999-02-071-2/+2
| | | | | | attempt to optimize forks but were essentially given-up on due to problems and replaced with an explicit dup of the vm_map_entry structure. Prior to the removal, they were entirely unused.
* Correct a format mismatch on 64-bit architectures. This shouldjdp1999-02-051-3/+3
| | | | fix the erroneous values in the procfs "map" file on the Alpha.
* First version.semenu1999-02-0310-0/+4176
| | | | Reviewed by: David O'Brien <obrien@NUXI.com>
* Don't comment out dead code; remove it.bde1999-01-311-4/+1
|
* Use suser() to determine super-user-ness.phk1999-01-301-17/+15
| | | | | | Don't pretend we can mount RW. Reviewed by: bde
* Removed a bogus cast to c_caddr_t. This is part of terminatingbde1999-01-291-2/+8
| | | | | | | | | c_caddr_t with extreme prejudice. Here we want to convert from `const char *' to `const char *'. Casting through c_caddr_t is not the way to do this. The original cast to caddr_t was apparently to break warnings about const mismatches in other versions of BSD (in 4.4BSDLite2, the conversion is from `const char *path' to plain caddr_t).
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-282-5/+5
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-271-2/+2
| | | | | | | kernel compile. This commit includes significant work to proper handle const arguments for the DDB symbol routines.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-2710-25/+39
| | | | kernel compile
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-274-25/+32
| | | | kernel compile
* Fix warnings preparing for -Wall -Wcast-qualdillon1999-01-272-4/+12
| | | | | Also disable one usb module in LINT due to fatal compilation errors, temporary.
* This is a rather large commit that encompasses the new swapper,dillon1999-01-212-10/+8
| | | | | | | | | | 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>
* Add 'options DEBUG_LOCKS', which stores extra information in structeivind1999-01-201-1/+11
| | | | | | | | lock, and add some macros and function parameters to make sure that the information get to the point where it can be put in the lock structure. While I'm here, add DEBUG_VFS_LOCKS to LINT.
* Missed a stray LKM #ifdefpeter1999-01-171-5/+8
|
* Mountroot could concievably make sense to a KLD though, in the preloadpeter1999-01-171-6/+1
| | | | case. I'm not sure the autoconf code is up to it though...
* Clean up the KLD/LKM goop a bit.peter1999-01-173-93/+23
|
* Remove declarations for undefined functions and a couple of unusedeivind1999-01-122-21/+2
| | | | enotsupp implementations.
* Don't pass unused unused timestamp args to UFS_UPDATE() or wastebde1999-01-071-2/+5
| | | | | time initializing them. This almost finishes centralizing (in-core) timestamp updates in ufs_itimes().
* Remove the 'waslocked' parameter to vfs_object_create().eivind1999-01-052-6/+9
|
* A partial implementation of the procfs cmdline pseudo-file. Thispeter1999-01-054-5/+51
| | | | | | | | is enough to satisfy things like StarOffice. This is a hack, but doing it properly would be a LOT of work, and would require extensive grovelling around in the user address space to find the argv[]. Obtained from: Mostly from Andrzej Bialecki <abial@nask.pl>.
* Now empty DOS filesystems default to long file names. Non-empty filesystemsdt1999-01-021-5/+7
| | | | without traces of Win95 default to short file names, as before.
* Ensure that deHighClust in direntry always initialized.dt1999-01-021-19/+29
| | | | | | | | | Noticed by: Carl Mascott <cmascott@world.std.com> Don't write access time of a file more than once per day. (Its precision is 1 day anyway). Don't try to write access and creation time in nonwin95 case. Suggested by: bde (long time ago).
* Ifdefed conditionally used simplock variables.bde1999-01-022-2/+6
|
OpenPOWER on IntegriCloud