summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Don't set DE_ACCESS for unsuccessful reads.bde1999-07-251-8/+12
| | | | | | | | | | Translated from: a similar fix in ufs_readwrite.c rev.1.61. Don't forget to set DE_ACCESS for short reads. Check for invalid (negative) offsets before checking for reads of 0 bytes, as in ufs, although checking for invalid offsets at all is probably a bug.
* Remove the RCS "Log" and all the verbiage it has generated.phk1999-07-2110-1304/+12
|
* Now a dev_t is a pointer to struct specinfo which is shared by all specdevphk1999-07-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vnodes referencing this device. Details: cdevsw->d_parms has been removed, the specinfo is available now (== dev_t) and the driver should modify it directly when applicable, and the only driver doing so, does so: vn.c. I am not sure the logic in checking for "<" was right before, and it looks even less so now. An intial pool of 50 struct specinfo are depleted during early boot, after that malloc had better work. It is likely that fewer than 50 would do. Hashing is done from udev_t to dev_t with a prime number remainder hash, experiments show no better hash available for decent cost (MD5 is only marginally better) The prime number used should not be close to a power of two, we use 83 for now. Add new checkalias2() to get around the loss of info from dev2udev() in bdevvp(); The aliased vnodes are hung on a list straight of the dev_t, and speclisth[SPECSZ] is unused. The sharing of struct specinfo means that the v_specnext moves into the vnode which grows by 4 bytes. Don't use a VBLK dev_t which doesn't make sense in MFS, now we hang a dummy cdevsw on B/Cmaj 253 so that things look sane. Storage overhead from all of this is O(50k). Bump __FreeBSD_version to 400009 The next step will add the stuff needed so device-drivers can start to hang things from struct specinfo
* Don't access the device with vp->v_specinfo->si_rdev, use vp->v_rdev.phk1999-07-201-2/+28
|
* I have not one single time remembered the name of this function correctlyphk1999-07-171-3/+3
| | | | so obviously I gave it the wrong name. s/umakedev/makeudev/g
* Allow jailed proccesses to open non-process vnodes like the root of the fs.phk1999-07-091-2/+2
|
* Use %q rather than rolling a custom routine.peter1999-07-091-51/+7
|
* Support for i386 hardware breakpoints.jlemon1999-07-091-0/+101
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Implement support for hardware debug registers on the i386.jlemon1999-07-093-3/+20
| | | | Submitted by: Brian Dean <brdean@unx.sas.com>
* Make sure that stat(2) and friends always return a valid st_dev field.phk1999-07-025-13/+6
| | | | | | Pseudo-FS need not fill in the va_fsid anymore, the syscall code will use the first half of the fsid, which now looks like a udev_t with major 255.
* move <sys/systm.h> before <sys/buf.h>peter1999-07-011-2/+2
|
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingmckusick1999-06-262-8/+7
| | | | | | | 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.
* Add a vnode argument to VOP_BWRITE to get rid of the last vnodemckusick1999-06-163-115/+8
| | | | | operator special case. Delete special case code from vnode_if.sh, vnode_if.src, umap_vnops.c, and null_vnops.c.
* Eliminate the bogus procfs private almost struct dirent structure.phk1999-06-133-43/+27
| | | | | Spotted by: Lars Hamren Reviewed by: bde
* Remove an unused variable.dt1999-06-011-2/+1
|
* Simplify cdevsw registration.phk1999-05-317-25/+16
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 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
OpenPOWER on IntegriCloud