summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
Commit message (Collapse)AuthorAgeFilesLines
* added support for link, and remove (unlink)julian1995-09-191-8/+150
| | | | | | can now ln /devs/disks/floppy/fd1.1200 to fd1 and remove unwanted dirs and devices etc. Still has a fatal bug.. don't use yet :)
* Submitted by: bdejulian1995-09-141-1/+1
| | | | prototype file follows the sources..
* Fixed init functions argument type - caddr_t -> void *. Fixed a couple ofdg1995-09-091-2/+2
| | | | compiler warnings.
* More hacking on devfs..julian1995-09-093-179/+469
| | | | | | | | | | | | I can now do an mv on devices and directories in devfs This was the hardest part.. link, delete and symlink will follow in short order. This code works but has definitly got vnode locking problems I am electing to get the structure of it working before spending too much time on the vnode confusion so it's probably not reliable at the moment.. never-the less it looks good. :)
* added the dev_link external registrationjulian1995-09-081-8/+32
| | | | | | | | used to produce a second link to an already exixting device e.g. dev_add /disks/sd0 dev_link /scsi/bus0/targ0/lun0 to /disks/sd0 (not real syntax)
* brought the README in to line with present code (still a bit cryptic)julian1995-09-071-24/+15
|
* more cleanups.. lots of code shuffled around toojulian1995-09-074-240/+239
| | | | | routines renamed.. more simplifications, some warnings squashed.
* Suggested by: :) bde of coursejulian1995-09-064-127/+155
| | | | | | | | | | | | | | | | added prototypes for every function and put (void *) as the args to the vop array definitions. can now compile with: CWARNFLAGS?= -W -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit \ -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes \ -Winline -Wstrict-prototypes and only get errors for files external to this module: namely ./vnode_if.h ../../sys/vnode.h ../../sys/buf.h ../../miscfs/specfs/specdev.h
* more devfs cleanups..julian1995-09-065-22/+29
| | | | if this keeps simplifying there won't be any left :)
* this file replaces two others.. I haven't removed them yet, butjulian1995-09-061-0/+897
| | | | when this code seems more solid, they get the bullet.
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-045-7/+18
| | | | for VOP_BMAP. Updated affected filesystems...
* remove about 50 lines of duplicate code..julian1995-09-031-117/+83
| | | | | the code to create the root directory now calls the generic make directory routine..
* devfs changes..julian1995-09-034-79/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | changes to allow devices that don't probe (e.g. /dev/mem) to create devfs entries this required giving 'configure' its own SYSINIT entry so we could duck in just before it with a DEVFS init and some device inits.. my devfs now looks like: ./misc ./misc/speaker ./misc/mem ./misc/kmem ./misc/null ./misc/zero ./misc/io ./misc/console ./misc/pcaudio ./misc/pcaudioctl ./disks ./disks/rfloppy ./disks/rfloppy/fd0.1440 ./disks/rfloppy/fd1.1200 ./disks/floppy ./disks/floppy/fd0.1440 ./disks/floppy/fd1.1200 also some sligt cleanups.. DEVFS needs a lot of work but I'm getting back to it..
* Do not allow delete/rename lookup request to preventmpp1995-09-021-1/+7
| | | | | panics if a user attempts to remove/rename files in a fdesc file system.
* Correctly initialize the mount stat structure so thatmpp1995-09-021-1/+4
| | | | | fdesc file systems show up in "mount" correctly and so that they can then be unmounted.
* Change procfs_lookup to not allow delete/rename operationsmpp1995-09-021-3/+6
| | | | | | | to prevent panics when a user tries to remove/rename the contents of /proc/###/*. Obtained from: 4.4BSD-lite2
* Submitted by: Julianjulian1995-09-021-7/+5
| | | | changes to make it compile again
* The `cred' and `proc' args were missing for some VOP_OPEN() and VOP_CLOSE()bde1995-08-172-5/+5
| | | | | | | | calls. Found by: gcc -Wstrict-prototypes after I supplied some of the 5000+ missing prototypes. Now I have 9000+ lines of warnings and errors about bogus conversions of function pointers.
* Be careful not to dereference NULL credentials pointers when doing thedg1995-08-111-3/+7
| | | | getattr function.
* Allow a pipe to be opened read/write at one end, as is allowed injkh1995-08-061-15/+28
| | | | | | | SunOS and SCO. You can then even use the pipe as a cheap fifo stack (yuck!). A semantic change also important (but not limited) to iBCS2 compatibility. Submitted by: swallace
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-012-5/+5
| | | | | | | wrong vp's ops vector being used by changing the VOP_LINK's argument order. The special-case hack doesn't go far enough and breaks the generic bypass routine used in some non-leaf filesystems. Pointed out by Kirk McKusick.
* Fix some incorrect comments that make reference to /dev/fd.mpp1995-07-311-4/+4
|
* Fix various kernfs file system problems, which can result inmpp1995-07-311-42/+61
| | | | | | | | | | | | | | umountable file systems, hung processes, or system panics: - Some operations could return without decrementing the vnode reference count. - Some operations could leave the vnode locked. - Generalize the /kern/rootdev & rrootdev files so that they are no longer special cased in kernfs_lookup(). Note: procfs, fdescfs, and most of the other miscfs/* file systems also suffer from the same type of problems and I will work on fixing them one at a time.
* Eliminate sloppy common-style declarations. There should be none left forbde1995-07-292-12/+4
| | | | the LINT configuation.
* Don't include <sys/tty.h> in drivers that aren't tty drivers or in generalbde1995-07-161-2/+1
| | | | files that don't depend on the internals of <sys/tty.h>
* NOTE: libkvm, w, ps, 'top', and any other utility which depends on structdg1995-07-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proc or any VM system structure will have to be rebuilt!!! Much needed overhaul of the VM system. Included in this first round of changes: 1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages, haspage, and sync operations are supported. The haspage interface now provides information about clusterability. All pager routines now take struct vm_object's instead of "pagers". 2) Improved data structures. In the previous paradigm, there is constant confusion caused by pagers being both a data structure ("allocate a pager") and a collection of routines. The idea of a pager structure has escentially been eliminated. Objects now have types, and this type is used to index the appropriate pager. In most cases, items in the pager structure were duplicated in the object data structure and thus were unnecessary. In the few cases that remained, a un_pager structure union was created in the object to contain these items. 3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now be removed. For instance, vm_object_enter(), vm_object_lookup(), vm_object_remove(), and the associated object hash list were some of the things that were removed. 4) simple_lock's removed. Discussion with several people reveals that the SMP locking primitives used in the VM system aren't likely the mechanism that we'll be adopting. Even if it were, the locking that was in the code was very inadequate and would have to be mostly re-done anyway. The locking in a uni-processor kernel was a no-op but went a long way toward making the code difficult to read and debug. 5) Places that attempted to kludge-up the fact that we don't have kernel thread support have been fixed to reflect the reality that we are really dealing with processes, not threads. The VM system didn't have complete thread support, so the comments and mis-named routines were just wrong. We now use tsleep and wakeup directly in the lock routines, for instance. 6) Where appropriate, the pagers have been improved, especially in the pager_alloc routines. Most of the pager_allocs have been rewritten and are now faster and easier to maintain. 7) The pagedaemon pageout clustering algorithm has been rewritten and now tries harder to output an even number of pages before and after the requested page. This is sort of the reverse of the ideal pagein algorithm and should provide better overall performance. 8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup have been removed. Some other unnecessary casts have also been removed. 9) Some almost useless debugging code removed. 10) Terminology of shadow objects vs. backing objects straightened out. The fact that the vm_object data structure escentially had this backwards really confused things. The use of "shadow" and "backing object" throughout the code is now internally consistent and correct in the Mach terminology. 11) Several minor bug fixes, including one in the vm daemon that caused 0 RSS objects to not get purged as intended. 12) A "default pager" has now been created which cleans up the transition of objects to the "swap" type. The previous checks throughout the code for swp->pg_data != NULL were really ugly. This change also provides the rudiments for future backing of "anonymous" memory by something other than the swap pager (via the vnode pager, for example), and it allows the decision about which of these pagers to use to be made dynamically (although will need some additional decision code to do this, of course). 13) (dyson) MAP_COPY has been deprecated and the corresponding "copy object" code has been removed. MAP_COPY was undocumented and non- standard. It was furthermore broken in several ways which caused its behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will continue to work correctly, but via the slightly different semantics of MAP_PRIVATE. 14) (dyson) Sharing maps have been removed. It's marginal usefulness in a threads design can be worked around in other ways. Both #12 and #13 were done to simplify the code and improve readability and maintain- ability. (As were most all of these changes) TODO: 1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing this will reduce the vnode pager to a mere fraction of its current size. 2) Rewrite vm_fault and the swap/vnode pagers to use the clustering information provided by the new haspage pager interface. This will substantially reduce the overhead by eliminating a large number of VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be improved to provide both a "behind" and "ahead" indication of contiguousness. 3) Implement the extended features of pager_haspage in swap_pager_haspage(). It currently just says 0 pages ahead/behind. 4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps via a much more general mechanism that could also be used for disk striping of regular filesystems. 5) Do something to improve the architecture of vm_object_collapse(). The fact that it makes calls into the swap pager and knows too much about how the swap pager operates really bothers me. It also doesn't allow for collapsing of non-swap pager objects ("unnamed" objects backed by other pagers).
* Added missing splx() in DIAGNOSTIC code.dg1995-07-081-1/+2
| | | | Suggested by enami@sys.ptg.sony.co.jp.
* Fixed VOP_LINK argument order botch.dg1995-06-281-2/+2
|
* Killed the "probably_never" ifdef'd code.dg1995-06-281-68/+1
|
* Remove trailing whitespace.rgrimes1995-05-3021-120/+120
|
* Fixed panic that resulted from mmaping files in kernfs and procfs. Adg1995-05-255-38/+13
| | | | | | | | | | regular user could panic the machine with a simple "tail /proc/curproc/mem" command. The problem was twofold: both kernfs and procfs didn't fill in the mnt_stat statfs struct (which would later lead to an integer divide fault in the vnode pager), and kernfs bogusly paniced if a bmap was attempted. Reviewed by: John Dyson
* Fix -Wformat warnings from LINT kernel.rgrimes1995-05-111-3/+3
|
* change to reflect reality.julian1995-05-031-4/+6
| | | | (yes I know I should have done one commit rod....)
* remove debugging printouts unless DEVFS_DEBUG is set.julian1995-05-031-3/+2
|
* Submitted by: phkjulian1995-05-031-4/+25
| | | | | | | if the 'time on a node is 0,.. tell the world it is the same as 'boottime'. This is becasue 'time' is not set up when we create the nodes, so we can't set them then.
* remove note about 'find' now that it's fixed.julian1995-04-201-6/+4
|
* Submitted by: phk@freebsd.orgjulian1995-04-201-1/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: Julian fixes the 'find' anomaly mentionned in the README (hmm I guess I should fix that too..) diff -r1.2 devfs_vnops.c 905a906 > dirent.d_type = DT_DIR; 914a916 > dirent.d_type = DT_DIR; 920a923,941 > switch(name_node->dnp->type) { > case DEV_BDEV: > dirent.d_type = DT_BLK; > break; > case DEV_CDEV: > dirent.d_type = DT_CHR; > break; > case DEV_DDEV: > dirent.d_type = DT_SOCK; /*XXX*/ > break; > case DEV_DIR: > dirent.d_type = DT_DIR; > break; > case DEV_SLNK: > dirent.d_type = DT_LNK; > break; > default: > dirent.d_type = DT_UNKNOWN; > }
* Submitted by: julianjulian1995-04-201-3/+4
| | | | | @#%$#@ ftp -p corrupted the file in transfer.. (cut off the last 2 lines).. fix this
* Submitted by: julianjulian1995-04-206-176/+161
| | | | | I did a cleanup on the code.. (why didn't I do that before I checked it in? I hear you ask..)
* Reviewed by:julian1995-04-201-0/+123
| | | | | Submitted by: julian oops rename doc file to README as agreed
* Reviewed by: no-one yet, but nonintrusive until configed in.. :)julian1995-04-207-0/+2805
| | | | | Submitted by: julian@freebsd.org Obtained from: written from scratch
* For P_SUGID processes, we must also change ownership of the mem filedg1995-04-151-2/+10
| | | | to root so that group kmem can still get to it. *SIGH*
* Retain group kmem readability for P_SUGID processes.dg1995-04-151-2/+6
|
* Made /proc/n/mem file group kmem and group readable. Needed to fix ps sodg1995-04-153-5/+7
| | | | that it doesn't need to be setuid root.
* Changes from John Dyson and myself:dg1995-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed remaining known bugs in the buffer IO and VM system. vfs_bio.c: Fixed some race conditions and locking bugs. Improved performance by removing some (now) unnecessary code and fixing some broken logic. Fixed process accounting of # of FS outputs. Properly handle NFS interrupts (B_EINTR). (various) Replaced calls to clrbuf() with calls to an optimized routine called vfs_bio_clrbuf(). (various FS sync) Sync out modified vnode_pager backed pages. ffs_vnops.c: Do two passes: Sync out file data first, then indirect blocks. vm_fault.c: Fixed deadly embrace caused by acquiring locks in the wrong order. vnode_pager.c: Changed to use buffer I/O system for writing out modified pages. This should fix the problem with the modification date previous not getting updated. Also dramatically simplifies the code. Note that this is going to change in the future and be implemented via VOP_PUTPAGES(). vm_object.c: Fixed a pile of bugs related to cleaning (vnode) objects. The performance of vm_object_page_clean() is terrible when dealing with huge objects, but this will change when we implement a binary tree to keep the object pages sorted. vm_pageout.c: Fixed broken clustering of pageouts. Fixed race conditions and other lockup style bugs in the scanning of pages. Improved performance.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-282-5/+4
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
* Removed redundant newlines that were in some panic strings.dg1995-03-192-4/+4
|
* Add four more filesystem flags:wollman1995-03-167-14/+14
| | | | | | | | | | VFCF_NETWORK (this FS goes over the net) VFCF_READONLY (read-write mounts do not make any sense) VFCF_SYNTHETIC (data in this FS is not real) VFCF_LOOPBACK (this FS aliases something else) cd9660 is readonly; nullfs, umapfs, and union are loopback; NFS is netowkr; procfs, kernfs, and fdesc are synthetic.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-1612-20/+29
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Make sure process isn't swapped when messing with it.dg1995-02-202-3/+4
| | | | Added missing newline to log() call.
OpenPOWER on IntegriCloud