summaryrefslogtreecommitdiffstats
path: root/sys/ufs/lfs
Commit message (Collapse)AuthorAgeFilesLines
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-241-2/+1
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Merged the rest of lfs from Lite2. It compiles (uncleanly) but is asbde1997-03-239-185/+460
| | | | unlikely to work as before.
* Merged enough of lfs from Lite2 for mkdep of LINT to work again.bde1997-03-222-179/+218
|
* Removed `volatile' from declaration of `time', and removed the resultingbde1997-03-221-2/+2
| | | | | | | | null casts. `time' is nonvolatile for accesses within a region locked by splclock()/splx(). Accesses outside such a region are invalid, and splx() must have the side effect of potentially changing all global variables (since there are hundreds of sort of volatile variables like `time'), so declaring `time' as volatile didn't have any real benefits.
* Fixed some invalid (non-atomic) accesses to `time', mostly ones of thebde1997-03-222-4/+4
| | | | | | form `tv = time'. Use a new function gettime(). The current version just forces atomicicity without fixing precision or efficiency bugs. Simplified some related valid accesses by using the central function.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2213-13/+13
| | | | ready for it yet.
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-102-9/+10
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1413-13/+13
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Whoops, I should've used the LINT config file. More ts -> tv changesnate1996-09-201-4/+4
| | | | for timespec structure.
* Don't depend in the kernel on the gcc feature of doing arithmetic onbde1996-08-311-2/+2
| | | | pointers of type `void *'. Warn about this in future.
* Don't use NULL in non-pointer contexts.bde1996-07-121-2/+2
|
* Clean up -Wunused warnings.gpalmer1996-06-121-1/+5
| | | | Reviewed by: bde
* Moved the fsnode MALLOC to before the call to getnewvnode() so that thedg1996-06-121-2/+9
| | | | | | | | process won't possibly block before filling in the fsnode pointer (v_data) which might be dereferenced during a sync since the vnode is put on the mnt_vnodelist by getnewvnode. Pointed out by Matt Day <mday@artisoft.com>
* Removed bogus _BEGIN_DECLS/_END_DECLS.bde1996-05-011-9/+4
| | | | | | Removed unused struct tag declarations in cloned code. Added or cleaned up idempotency ifdefs.
* Make type compatible with Lite2.hsu1996-03-271-2/+2
| | | | Submitted by: bde
* Convert QUOTA to new-style option.wollman1996-01-053-3/+9
|
* Fixed prototyping and staticizing for -DDEBUG case.bde1995-12-222-8/+8
|
* Staticize.phk1995-12-176-233/+82
|
* Untangled the vm.h include file spaghetti.dg1995-12-073-3/+10
|
* Fixed compilation of lfs utilities which I broke the other day bybde1995-12-062-7/+15
| | | | #including lfs_extern.h and goop to support it in lfs_conv.c.
* Completed function declarations and/or added prototypes and/or #includesbde1995-12-033-5/+14
| | | | to get the prototypes.
* Included <sys/sysproto.h> to get central declarations for syscall argsbde1995-11-121-1/+10
| | | | | | | | | | structs and prototypes for syscalls. Ifdefed duplicated decentralized declarations of args structs. It's convenient to have this visible but they are hard to maintain. Some are already different from the central declarations. 4.4lite2 puts them in comments in the function headers but I wanted to avoid the large changes for that.
* Introduced a type `vop_t' for vnode operation functions and usedbde1995-11-092-134/+134
| | | | | | | | | | | | | | | it 1138 times (:-() in casts and a few more times in declarations. This change is null for the i386. The type has to be `typedef int vop_t(void *)' and not `typedef int vop_t()' because `gcc -Wstrict-prototypes' warns about the latter. Since vnode op functions are called with args of different (struct pointer) types, neither of these function types is any use for type checking of the arg, so it would be preferable not to use the complete function type, especially since using the complete type requires adding 1138 casts to avoid compiler warnings and another 40+ casts to reverse the function pointer conversions before calling the functions.
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-044-9/+9
| | | | for VOP_BMAP. Updated affected filesystems...
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-281-27/+91
| | | | | | | | | | | | | | | | | | | | | | Submitted by: terry (terry lambert) This is a composite of 3 patch sets submitted by terry. they are: New low-level init code that supports loadbal modules better some cleanups in the namei code to help terry in 16-bit character support some changes to the mount-root code to make it a little more modular.. NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able to test those cases.. certainly mounting root of disk still works just fine.. mfs should work but is untested. (tomorrows task) The low level init stuff includes a total rewrite of init_main.c to make it possible for new modules to have an init phase by simply adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can be added to the kernel without editing any other files other than the 'files' file.
* Make everything except the unsupported network sources compile cleanlybde1995-08-162-3/+3
| | | | with -Wnested-externs.
* Converted mountlist to a CIRCLEQ.dg1995-08-111-2/+2
| | | | Partially obtained from: 4.4BSD-Lite2
* Removed redundant call to vm_object_page_clean: this is already handleddg1995-08-061-7/+1
| | | | by vfs_msync().
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-011-2/+2
| | | | | | | 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.
* Eliminate sloppy common-style declarations. There should be none left forbde1995-07-293-6/+5
| | | | the LINT configuation.
* 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).
* 1) Converted v_vmdata to v_object.dg1995-06-281-3/+3
| | | | | | | 2) Removed unnecessary vm_object_lookup()/pager_cache(object, TRUE) pairs after vnode_pager_alloc() calls - the object is already guaranteed to be persistent. 3) Removed some gratuitous casts.
* Fixed VOP_LINK argument order botch.dg1995-06-281-4/+4
|
* Remove trailing whitespace.rgrimes1995-05-309-40/+40
|
* Fix -Wformat warnings from LINT kernel.rgrimes1995-05-112-5/+5
|
* Changes to get rid of ufslk2 hangs when doing read/write to/fromdyson1995-04-241-1/+3
| | | | mmap regions that are in the same file as the read/write.
* Make vegetarian and animal rights people happy and use 0xdeadc0de insteaddg1995-04-161-3/+3
| | | | of 0xdeadbeef as the 'spare' value.
* Changes from John Dyson and myself:dg1995-04-092-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-286-11/+18
| | | | | (except in netccitt, netiso and netns) that I didn't notice when I fixed "all" such warnings before.
* Removed third arg (vmio) to allocbuf() that was added with the originaldg1995-03-261-2/+2
| | | | | | | | merged cache changes, and figure it out based on the B_VMIO buffer flag. Fixes a problem where delayed write VMIO buffers would sometimes get recopied into kernel-alloced memory. Submitted by: John Dyson
* Removed redundant newlines that were in some panic strings.dg1995-03-194-9/+9
|
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-2/+1
| | | | | | (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.
* Removed obsolete vtrace() remnants.dg1995-03-041-2/+1
|
* These changes embody the support of the fully coherent merged VM buffer cache,dg1995-01-095-15/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | much higher filesystem I/O performance, and much better paging performance. It represents the culmination of over 6 months of R&D. The majority of the merged VM/cache work is by John Dyson. The following highlights the most significant changes. Additionally, there are (mostly minor) changes to the various filesystem modules (nfs, msdosfs, etc) to support the new VM/buffer scheme. vfs_bio.c: Significant rewrite of most of vfs_bio to support the merged VM buffer cache scheme. The scheme is almost fully compatible with the old filesystem interface. Significant improvement in the number of opportunities for write clustering. vfs_cluster.c, vfs_subr.c Upgrade and performance enhancements in vfs layer code to support merged VM/buffer cache. Fixup of vfs_cluster to eliminate the bogus pagemove stuff. vm_object.c: Yet more improvements in the collapse code. Elimination of some windows that can cause list corruption. vm_pageout.c: Fixed it, it really works better now. Somehow in 2.0, some "enhancements" broke the code. This code has been reworked from the ground-up. vm_fault.c, vm_page.c, pmap.c, vm_object.c Support for small-block filesystems with merged VM/buffer cache scheme. pmap.c vm_map.c Dynamic kernel VM size, now we dont have to pre-allocate excessive numbers of kernel PTs. vm_glue.c Much simpler and more effective swapping code. No more gratuitous swapping. proc.h Fixed the problem that the p_lock flag was not being cleared on a fork. swap_pager.c, vnode_pager.c Removal of old vfs_bio cruft to support the past pseudo-coherency. Now the code doesn't need it anymore. machdep.c Changes to better support the parameter values for the merged VM/buffer cache scheme. machdep.c, kern_exec.c, vm_glue.c Implemented a seperate submap for temporary exec string space and another one to contain process upages. This eliminates all map fragmentation problems that previously existed. ffs_inode.c, ufs_inode.c, ufs_readwrite.c Changes for merged VM/buffer cache. Add "bypass" support for sneaking in on busy buffers. Submitted by: John Dyson and David Greenman
* LFS stability patches. There is still a problem with directory updategibbs1995-01-045-61/+87
| | | | | | | ordering that can prove fatal during large batches of deletes, but this is much better than it was. I probably won't be putting much more time into this until Seltzer releases her new version of LFS which has fragment support. This should be availible just before USENIX.
* John Dyson's patches (and a few from me too) to LFS to use a differentgibbs1994-11-175-17/+111
| | | | | | | | | | | | | | | | | | | | | buffering scheme and make it more in tune with FreeBSD's vfs_bio implementation. The filesystem seems fairly stable, but I wouldn't recommend it to anyone not willing to experience problems. This is very green code and has the limitation that YOU CAN ONLY HAVE ONE LFS PARTITION MOUNTED AT A TIME. What LFS is good for: Non fsynced writes FASTER THAN FFS Large deletions Increadibly fast Reads are a little bit slower than FFS right now, but that is a factor of how under optimized this code is. LFS should in theory perform at least as well as FFS under fsync (iozone) type loads, and this is what I'm currently working on. Reviewed by: Justin Gibbs Submitted by: John Dyson Obtained from:
* Undo a previous change. <sys/disklabel.h> was broken, not these files.bde1994-11-141-2/+1
|
* From: fredriks@mcs.com (Lars Fredriksen)jkh1994-10-281-1/+2
| | | | | | | ... It turns out that these files do not include <sys/dkbad.h> before <sys/disklabel.h>. Submitted by: fredriks
* Cosmetics. make gcc less noisy. Still some way to go here.phk1994-10-104-9/+17
|
OpenPOWER on IntegriCloud