summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Finalize GETPAGES layering scheme. Move the device GETPAGESdyson1995-10-232-132/+61
| | | | | interface into specfs code. No need at this point to modify the PUTPAGES stuff except in the layered-type (NULL/UNION) filesystems.
* Moved the filesystem read-only check out of the syscalls and into thedg1995-10-222-43/+66
| | | | | | | | filesystem layer, as was done in lite-2. Merged in some other cosmetic changes while I was at it. Rewrote most of msdosfs_access() to be more like ufs_access() and to include the FS read-only check. Obtained from: partially from 4.4BSD-lite2
* Return EINVAL instead of panicing for rename("dir1", "dir2/..").bde1995-10-071-2/+2
| | | | | | Fixes part of PR 760. This bug seems to be very old.
* use roundup2 to avoid a bunch of 64bit divides.phk1995-10-061-5/+5
|
* Re-enable read clustering.dyson1995-09-251-3/+3
|
* Shit! I changed the wrong doclusterread! ...Thanks to Steven Wallace anddg1995-09-221-2/+2
| | | | Poul-Henning for convincing me that I should look at my mistake! :-)
* Disable file read clustering until the bug(s) in vfs_cluster.c are fixed.dg1995-09-221-2/+2
| | | | | This should temporarily fix the sig 10/11 problems that people have been having for the past 3 weeks.
* Remove transitory labelling code. Labels are now handled by essentiallybde1995-09-161-287/+16
| | | | | the original 4.4lite code. Machine Specific Partitions are now handled separately.
* Fix benign type mismatch in a call to VOP_BMAP().bde1995-09-111-2/+2
|
* Obtained from:4.4lite2julian1995-09-091-10/+14
| | | | | | | | | | | | | | | | | | fix a change where a shortcut resulted in teh wrong answer.. e.g. touch a touch b mv a b resulted in b being removed and a being moved to b in the shortcut.. touch a ln a b mv a b the wrong link was removed.. leaving a instead of b, giving a different result to when both files were separate.
* Slight optimization for the standard case of rotdelay=0.dg1995-09-081-11/+11
|
* Correct a case in the ffs_getpages where a page is not found indyson1995-09-071-1/+3
| | | | a sparse file and the page is zeroed but not set valid, clean.
* Added indirect pointer for ffs_getpages, and added external declaration.dyson1995-09-062-2/+4
|
* Added new ffs_getpages routine. It isn't optimized yet, but FFSdyson1995-09-061-1/+191
| | | | | now does it's own getpage -- instead of using the default routine in vnode_pager.c.
* Correct prototype for ufs_bmaparray()dyson1995-09-041-2/+2
|
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-047-18/+41
| | | | for VOP_BMAP. Updated affected filesystems...
* Declare vfs_mountroot() in the right place.bde1995-08-301-3/+1
|
* Fix correct_writedisklabel() and writedisklabel(). Their setting ofbde1995-08-281-11/+14
| | | | | | | | | | | bp->b_flags has been broken for many years: a) they didn't set B_BUSY for doing i/o. This has been fatal since 1995/07/25 when biodone() started checking that B_BUSY is set. b) they didn't set B_INVAL for releasing the buffer. This at best just put a useless buffer in the LRU queue for a little while. Fix a couple of spelling errors and complete a couple of function pointer declarations.
* Reviewed by: julian with quick glances by bruce and othersjulian1995-08-287-270/+515
| | | | | | | | | | | | | | | | | | | | | | 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.
* Don't call VOP_UPDATE() with volatile timestamps.bde1995-08-252-6/+12
|
* Fixed mfs reboot panic by never returning failure from mfs_start().dg1995-08-201-6/+5
| | | | Obtained from: 4.4BSD-Lite2
* Make everything except the unsupported network sources compile cleanlybde1995-08-162-3/+3
| | | | with -Wnested-externs.
* Honor -async mount option when doing the inode update.dg1995-08-161-2/+2
| | | | Obtained from: 4.4BSD-Lite2
* Converted mountlist to a CIRCLEQ.dg1995-08-113-6/+6
| | | | Partially obtained from: 4.4BSD-Lite2
* On closer inspection, it turns out that all of the callers of disksortdg1995-08-071-5/+1
| | | | are already at splbio()...so back out the last change to disksort.
* Since buffers can be pulled off of the disk queue at interrupt time anddg1995-08-071-2/+7
| | | | | | disksort is called at non-interrupt time and can be actively traversing the list when that happens, there is a very small window of vulnerability. Close it by protecting disksort with splbio().
* Use bdwrite() rather than brelse(). The cylinder group bitmap modificationdg1995-08-071-2/+2
| | | | | | | | is not preserved otherwise. Note that this is a no-op in FreeBSD, however, as we have doreallocblks disabled. Submitted by: Kirk McKusick
* Removed redundant call to vm_object_page_clean: this is already handleddg1995-08-061-7/+1
| | | | by vfs_msync().
* Removed redundant call to vm_object_page_clean - this is already donedg1995-08-061-6/+1
| | | | in vfs_msync().
* Use the correct flags (IO_SYNC -> B_SYNC) when deciding to do a sync ordg1995-08-041-3/+3
| | | | | | | async write in the section that changes the filesize. The bug resulted in the updates always being async. Obtained from: 4.4BSD-Lite2
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-012-4/+4
| | | | | | | 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-294-8/+6
| | | | the LINT configuation.
* Since ufs_ihashget can block, the lock must be checked for each timedg1995-07-211-14/+8
| | | | | | | the function returns. Also, moved lock into .bss and made minor cosmetic changes. Submitted by: Bruce Evans
* Implement a lock in ffs_vget to prevent a race condition where two processesdg1995-07-211-4/+34
| | | | | | try allocate the same inode/vnode, causing a duplicate. Submitted by: Matt Dillon, slightly reworked by me.
* NOTE: libkvm, w, ps, 'top', and any other utility which depends on structdg1995-07-132-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-282-7/+7
| | | | | | | 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-282-15/+15
|
* Remove trailing whitespace.rgrimes1995-05-3021-98/+98
|
* Mount MFS as root RW. Remounting doesn't make sense.phk1995-05-291-2/+1
| | | | Reviewed by: davidg
* Kill bogus vnode_pager_setsize(). It was being called at the wrong timedg1995-05-281-2/+1
| | | | | | | and resulted in the object size being too small. This caused bad things to happen later when the file was mapped. Reviewed by: John Dyson
* Changes to fix the following bugs:dg1995-05-211-9/+1
| | | | | | | | | | | | | | | 1) Files weren't properly synced on filesystems other than UFS. In some cases, this lead to lost data. Most likely would be noticed on NFS. The fix is to make the VM page sync/object_clean general rather than in each filesystem. 2) Mixing regular and mmaped file I/O on NFS was very broken. It caused chunks of files to end up as zeroes rather than the intended contents. The fix was to fix several race conditions and to kludge up the "b_dirtyoff" and "b_dirtyend" that NFS relies upon - paying attention to page modifications that occurred via the mmapping. Reviewed by: David Greenman Submitted by: John Dyson
* NFS diskless operation was broken because swapdev_vp wasn't initialized.dg1995-05-192-8/+8
| | | | | | | These changes solve the problem in a general way by moving the initialization out of the individual fs_mountroot's and into swaponvp(). Submitted by: Poul-Henning Kamp
* Fixed incompleteness that would allow dirty filesystems to get mounteddg1995-05-151-5/+21
| | | | | | | | | when the single user shell was terminated. These changes disallow mounting or R/W upgrading filesystems that are dirty unless "-f" (force) option is used with mount. /etc/rc has been modified to abort the startup if one or more non-nfs partitions fail to mount. Reviewed by: Poul-Henning Kamp, Rod Grimes
* From Bruce Evans:dg1995-05-151-2/+3
| | | | | | | | | | | | | | | | | | | I ran into another manifestation of the problem reported in PR 211 and fixed it. Try this: as non-root: cd /tmp; mkdir x y x/z as root: chown root /tmp/x/z as non-root: cd /tmp/x; mv z ../y # EACCES as expected as root: cd /tmp/x; mv z ../y # EINVAL NOT as expected This is because ufs_rename() sets IN_RENAME and fails to clear it. Reviewed by: davidg Submitted by: bde
* Fix -Wformat warnings from LINT kernel.rgrimes1995-05-114-10/+12
|
* Limit filesize to the amount that the VM system can currently handledyson1995-05-011-1/+16
| | | | | | (2GB). If this limit is not imposed, then filesystem corruption will ensue when files larger than 2GB are created. This is temporary, and the underlying limitation will be removed later.
* Add a printf so we can see where we get our rootfs from.phk1995-04-251-1/+2
|
* Fixed the mmap hang fix previously committed so that it worksdyson1995-04-251-5/+9
| | | | | with options DIAGNOSTIC, and clear up an additional reference count problem.
* Changes to get rid of ufslk2 hangs when doing read/write to/fromdyson1995-04-245-28/+60
| | | | 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.
OpenPOWER on IntegriCloud