summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
Commit message (Collapse)AuthorAgeFilesLines
* All unimplemented VFS ops now have entries in kern/vfs_default.c that returnalfred1999-09-077-253/+39
| | | | | | | | | | | | | 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>
* Get rid of the NULLFS_DIAGNOSTIC option. This option was as useful asbde1999-09-044-20/+14
| | | | | | the other XXXFS_DIAGNOSTIC options (not very) and mostly controlled tracing of normal operation. Use `#ifdef DEBUG' for non-diagnostics and `#ifdef DIAGNOSTIC' for diagnostics.
* Fixed the previous change. Some more code controlled by UMAPFS_DIAGNOSTICbde1999-09-042-5/+3
| | | | is actually for diagnostics; control it with DIAGNOSTIC and not DDB.
* Print out the device name when there is an uninitialised IO size or IO errorjulian1999-09-031-2/+3
| | | | | | in spec_getpages(). Submitted by: phk suggested the idea.
* Add a catchall to set default blocksize values for disk like devices.julian1999-09-031-5/+13
| | | | Submitted by: phk@freebsd.org
* Revert a bunch of contraversial changes by PHK. Afterjulian1999-09-031-44/+33
| | | | | | | | | | a quick think and discussion among various people some form of some of these changes will probably be recommitted. The reversion requested was requested by dg while discussions proceed. PHK has indicated that he can live with this, and it has been agreed that some form of some of these changes may return shortly after further discussion.
* Set the buffersize for non BSDFFS labeled partitions tophk1999-08-311-4/+4
| | | | | | max(dev->si_bsize_phys, BLKDEV_IOSIZE). Requested by: davidg
* Make buffered acces to bdevs from userland controllable withphk1999-08-311-8/+18
| | | | a sysctl vfs.bdev_access.
* Make bdev userland access work like cdev userland access unlessphk1999-08-302-211/+36
| | | | | | | | | | 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.
* Converted the silly SAFTEY option into a new-style option by renaming it tobde1999-08-302-5/+4
| | | | | | DIAGNOSTIC. Fixed an English style bug in the panic messages controlled by SAFETY.
* Changed old-style option UNION_DIAGNOSTIC to DEBUG and fixed printfbde1999-08-292-12/+11
| | | | | | | format errors exposed by this. It has nothing to do with diagnostics since it does little more than control tracing of normal operation. Actual diagnostics for the union file system are still controlled by the DIAGNOSTIC option.
* Changed old-style options UMAPFS_DIAGNOSTIC and UMAP_DIAGNOSTIC to DEBUGbde1999-08-293-41/+43
| | | | | | or DDB and fixed printf format errors exposed by this. The options had little to do with diagnostics; they mostly controlled tracing of normal operation.
* Changed old-style option KERNFS_DIAGNOSTIC to DEBUG and fixed printfbde1999-08-292-30/+31
| | | | | format errors exposed by this. It has nothing to do with diagnostics since it does little more than control tracing of normal operation.
* Fix various trivial warnings from LINTphk1999-08-281-1/+1
|
* $Id$ -> $FreeBSD$peter1999-08-2844-45/+45
|
* Simplify the handling of VCHR and VBLK vnodes using the new dev_t:phk1999-08-262-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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;
* Make a place to store the devfs hook for the block device, as the samejulian1999-08-251-3/+2
| | | | specinfo is used to identify both raw and block version sof a device.
* Make DEVFS use PHK's specinfo struct as the source of dev_t and devsw.julian1999-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.
* Make DEVFS ops reflect some of the changes that have recently occured in thejulian1999-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.
* Fix comment to match reality..julian1999-08-251-1/+2
| | | | vop_strategy gets a vnode argument these days.
* Devfs now adds itself to the hook that PHK supplies.julian1999-08-241-1/+21
| | | | | block devices are still not handled correctly, though a kludge may make them "ok".
* Let processes retrieve their argv through procfs. Revert to the originalmarcel1999-08-191-8/+41
| | | | | | behaviour in all other cases. Submitted by: Andrew Gordon <arg@arg1.demon.co.uk>
* Remove an unused variable.billf1999-08-171-2/+1
| | | | Reviewed by: bde
* Add the (inline) function vm_page_undirty for clearing the dirty bitmaskalc1999-08-172-6/+6
| | | | | | | | of a vm_page. Use it. Submitted by: dillon
* Spring cleaning around strategy and disklabels/slices:phk1999-08-141-3/+3
| | | | | | | | | | | | | | Introduce BUF_STRATEGY(struct buf *, int flag) macro, and use it throughout. please see comment in sys/conf.h about the flag argument. Remove strategy argument from all the diskslice/label/bad144 implementations, it should be found from the dev_t. Remove bogus and unused strategy1 routines. Remove open/close arguments from dssize(). Pick them up from dev_t. Remove unused and unfinished setgeom support from diskslice/label/bad144 code.
* Add support for device drivers which want to track all open/closephk1999-08-131-59/+18
| | | | | | | | | | | | | | | operations. This allows a device driver better insight into what is going on that the current: proc1: open /dev/foo R/O devsw->open( R/O, proc1 ) proc2: open /dev/foo R/W devsw->open( R/W, proc2 ) proc2: close /* nothing, but device is really only R/O open */ proc1: close devsw->close( R/O, proc1 )
* Remove spec_getattr(), which as far as I can tell can never be called from ↵phk1999-08-131-3/+1
| | | | the current code-paths, and if it were, would panic on any unmounted bdev.
* The bdevsw() and cdevsw() are now identical, so kill the former.phk1999-08-132-11/+11
|
* s/v_specinfo/v_rdev/phk1999-08-131-6/+6
|
* Decommision miscfs/specfs/specdev.h. Most of it goes into <sys/conf.h>,phk1999-08-083-81/+2
| | | | | | a few lines into <sys/vnode.h>. Add a few fields to struct specinfo, paving the way for the fun part.
* Fixed printf format errors (%qu -> %llu; the arg was already unsigned longbde1999-08-081-5/+3
| | | | long to hide problems on alphas).
* Now a dev_t is a pointer to struct specinfo which is shared by all specdevphk1999-07-202-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* 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-026-15/+7
| | | | | | 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.
* Convert buffer locking from using the B_BUSY and B_WANTED flags to usingmckusick1999-06-262-9/+9
| | | | | | | 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-313-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Don't call calcru() on a swapped-out process. calcru() access p_stats, whichdt1999-05-221-16/+10
| | | | is in U-area.
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-114-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-082-23/+26
| | | | | | | | 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.
* Continue where Julian left off in July 1998:phk1999-05-072-13/+13
| | | | | | | | | | | | | | 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.)
* remove b_proc from struct buf, it's (now) unused.phk1999-05-062-6/+4
| | | | Reviewed by: dillon, bde
* 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
OpenPOWER on IntegriCloud