aboutsummaryrefslogtreecommitdiff
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Completed function declarations and/or added prototypes.Bruce Evans1995-11-212-6/+14
| | | | Notes: svn path=/head/; revision=12453
* Since FreeBSD clustering code now supports filesystems < PAGE_SIZE,John Dyson1995-11-201-2/+6
| | | | | | | enable clustering for cd9660, thereby giving a BIG performance boost. Notes: svn path=/head/; revision=12412
* KNFized spec_getpages_idone() and spec_getpages().Bruce Evans1995-11-181-43/+43
| | | | | | | | | Moved misplaced #includes. Completed function pointer declarations. Notes: svn path=/head/; revision=12373
* Moved declarations for static functions to the correct place (not in aBruce Evans1995-11-162-17/+23
| | | | | | | header) and cleaned them up. Notes: svn path=/head/; revision=12338
* Moved declarations for static functions to the correct place (not in aBruce Evans1995-11-162-52/+43
| | | | | | | | | header). Removed stupid comments. Notes: svn path=/head/; revision=12337
* Fixed the type of procfs_sync(). Trailing args were missing.Bruce Evans1995-11-161-4/+26
| | | | | | | | | | Fixed the type of procfs_fhtovp(). The args had little resemblance to the correct ones. Added prototypes. Notes: svn path=/head/; revision=12336
* Fixed the type of portal_sync(). Trailing args were missing.Bruce Evans1995-11-161-3/+28
| | | | | | | | | | Fixed the type of portal_fhtovp(). The args had little resemblance to the correct ones. Added prototypes. Notes: svn path=/head/; revision=12335
* Fixed the type of fdesc_sync(). Trailing args were missing.Bruce Evans1995-11-161-6/+27
| | | | | | | | | | Fixed the type of fdesc_fhtovp(). The args had little resemblance to the correct ones. Added prototypes. Notes: svn path=/head/; revision=12333
* Get rid of hostnamelen variable.Poul-Henning Kamp1995-11-141-3/+3
| | | | Notes: svn path=/head/; revision=12287
* Fixed getdirentries() on nfs mounted msdosfs's. No cookies were returnedBruce Evans1995-11-131-14/+3
| | | | | | | | | | | for certain common combinations of directory sizes, cluster sizes, and i/o sizes (e.g., 4K, 4K, and 4K). The fix in rev. 1.21 was incomplete. Reviewed by: dfr Obtained from: party from NetBSD Notes: svn path=/head/; revision=12265
* Brought in the setattr call support from Lite-2 so that more correct errorDavid Greenman1995-11-121-3/+38
| | | | | | | | | returns are provided. Obtained from: 4.4BSD-Lite2 Notes: svn path=/head/; revision=12230
* Fix isoilk hang caused by not checking for read-onlyness in several places.David Greenman1995-11-122-3/+19
| | | | | | | | | The fix for this in Lite-2 is more complete, but these quick hacks of mine are safer for now. I plan to integrate the additional Lite-2 stuff at some later time. Should completely fix PR810. Notes: svn path=/head/; revision=12228
* Removed unsed function dead_nullop().Bruce Evans1995-11-111-13/+3
| | | | | | | Converted incomplete function declarations to prototypes. Notes: svn path=/head/; revision=12203
* Introduced a type `vop_t' for vnode operation functions and usedBruce Evans1995-11-0921-521/+523
| | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=12158
* missed one static thingie.Poul-Henning Kamp1995-11-071-2/+2
| | | | Notes: svn path=/head/; revision=12145
* staticize private parts.Poul-Henning Kamp1995-11-076-35/+35
| | | | Notes: svn path=/head/; revision=12144
* Make a lot of private stuff static.Poul-Henning Kamp1995-11-075-78/+78
| | | | | | | | | | | | Should anybody out there wonder about this vendetta against global variables, it is basically to make it more visible what our interfaces in the kernel really are. I'm almost convinced we should have a #define PUBLIC /* public interface */ and use it in the #includes... Notes: svn path=/head/; revision=12143
* Pad out MSDOS boot block to 512 bytes (bugfix only)Paul Traina1995-10-311-2/+2
| | | | | | | Submitted by: Andreas Haakh, ah@alman.RoBIN.de Notes: svn path=/head/; revision=11977
* Make a lot of stuff static.Poul-Henning Kamp1995-10-314-66/+69
| | | | Notes: svn path=/head/; revision=11954
* Second batch of cleanup changes.Poul-Henning Kamp1995-10-294-79/+80
| | | | | | | | This time mostly making a lot of things static and some unused variables here and there. Notes: svn path=/head/; revision=11921
* Removal of unnecessary usage of PG_COPYONWRITE.John Dyson1995-10-231-2/+2
| | | | Notes: svn path=/head/; revision=11707
* Finalize GETPAGES layering scheme. Move the device GETPAGESJohn Dyson1995-10-232-2/+127
| | | | | | | | interface into specfs code. No need at this point to modify the PUTPAGES stuff except in the layered-type (NULL/UNION) filesystems. Notes: svn path=/head/; revision=11701
* Moved the filesystem read-only check out of the syscalls and into theDavid Greenman1995-10-222-102/+112
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=11644
* Add #include <sys/sysproto.h> to get struct close_args and closeSteven Wallace1995-10-081-1/+2
| | | | | | | function prototype. Notes: svn path=/head/; revision=11333
* Return EINVAL instead of panicing for rename("dir1", "dir2/..").Bruce Evans1995-10-071-2/+3
| | | | | | | | | Fixes part of PR 760. This bug seems to be very old. Notes: svn path=/head/; revision=11297
* Avoid some 64bit divides.Poul-Henning Kamp1995-10-061-5/+5
| | | | Notes: svn path=/head/; revision=11262
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countJohn Dyson1995-09-047-10/+29
| | | | | | | for VOP_BMAP. Updated affected filesystems... Notes: svn path=/head/; revision=10551
* Do not allow delete/rename lookup request to preventMike Pritchard1995-09-021-1/+7
| | | | | | | | panics if a user attempts to remove/rename files in a fdesc file system. Notes: svn path=/head/; revision=10534
* Correctly initialize the mount stat structure so thatMike Pritchard1995-09-021-1/+4
| | | | | | | | fdesc file systems show up in "mount" correctly and so that they can then be unmounted. Notes: svn path=/head/; revision=10533
* Change procfs_lookup to not allow delete/rename operationsMike Pritchard1995-09-021-3/+6
| | | | | | | | | | to prevent panics when a user tries to remove/rename the contents of /proc/###/*. Obtained from: 4.4BSD-lite2 Notes: svn path=/head/; revision=10531
* Fix bogus arg (&p instead of p) in the call to VOP_ACCESS() fromBruce Evans1995-08-251-2/+2
| | | | | | | msdosfs_setattr(). The bug was benign because the arg isn't used. Notes: svn path=/head/; revision=10272
* The `cred' and `proc' args were missing for some VOP_OPEN() and VOP_CLOSE()Bruce Evans1995-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. Notes: svn path=/head/; revision=10093
* Converted mountlist to a CIRCLEQ.David Greenman1995-08-111-2/+2
| | | | | | | Partially obtained from: 4.4BSD-Lite2 Notes: svn path=/head/; revision=10027
* Be careful not to dereference NULL credentials pointers when doing theDavid Greenman1995-08-111-3/+7
| | | | | | | getattr function. Notes: svn path=/head/; revision=10024
* Allow a pipe to be opened read/write at one end, as is allowed inJordan K. Hubbard1995-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 Notes: svn path=/head/; revision=9973
* Make sure that a non-null cookie vector is returned even if there were noDoug Rabson1995-08-031-1/+9
| | | | | | | valid entries in the block. Doing otherwise confuses the nfs server. Notes: svn path=/head/; revision=9878
* Add support for the va_filerev attribute required by NFSv3.Doug Rabson1995-08-024-4/+26
| | | | Notes: svn path=/head/; revision=9862
* Removed my special-case hack for VOP_LINK and fixed the problem with theDavid Greenman1995-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. Notes: svn path=/head/; revision=9842
* Eliminate sloppy common-style declarations. There should be none left forBruce Evans1995-07-291-10/+2
| | | | | | | the LINT configuation. Notes: svn path=/head/; revision=9759
* Change `extern inline' to `static inline' so that several functionsBruce Evans1995-07-251-9/+9
| | | | | | | | | | | | | | | don't go away when the kernel is compiled with -O. The functions are backed up by extern versions in cd9660_util.c, but these versions are disabled by `#ifdef __notanymore__'. They could have been enabled by using `#if defined(__notanymore__) || !defined(__OPTIMIZE__)' but then I would have had to check that they still work. The correct way to handle all this is to replace `extern inline' by `EXTERN_INLINE' and define `EXTERN_INLINE' as `extern inline' in most modules and as empty in one module. Notes: svn path=/head/; revision=9715
* There is a small bug in the cd9660 code that prevents stating ofJoerg Wunsch1995-07-161-1/+2
| | | | | | | | | | | | associated files. Submitted by: leo@dachau.marco.de (Matthias Pfaller) Not-obtained from: NetBSD. Instead sent directly to me by Matthias. (Sorry, this is to prevent people from claiming i might have gotten this from NetBSD. :) Notes: svn path=/head/; revision=9542
* Don't include <sys/tty.h> in drivers that aren't tty drivers or in generalBruce Evans1995-07-161-2/+1
| | | | | | | files that don't depend on the internals of <sys/tty.h> Notes: svn path=/head/; revision=9540
* NOTE: libkvm, w, ps, 'top', and any other utility which depends on structDavid Greenman1995-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). Notes: svn path=/head/; revision=9507
* Added missing splx() in DIAGNOSTIC code.David Greenman1995-07-081-1/+2
| | | | | | | Suggested by enami@sys.ptg.sony.co.jp. Notes: svn path=/head/; revision=9435
* Fixed VOP_LINK argument order botch.David Greenman1995-06-282-5/+5
| | | | Notes: svn path=/head/; revision=9354
* Killed the "probably_never" ifdef'd code.David Greenman1995-06-281-68/+1
| | | | Notes: svn path=/head/; revision=9346
* Merge RELENG_2_0_5 into HEADRodney W. Grimes1995-06-111-16/+7
| | | | Notes: svn path=/head/; revision=9202
* Remove trailing whitespace.Rodney W. Grimes1995-05-3035-442/+442
| | | | Notes: svn path=/head/; revision=8876
* Fixed panic that resulted from mmaping files in kernfs and procfs. ADavid Greenman1995-05-253-33/+7
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=8740
* NFS diskless operation was broken because swapdev_vp wasn't initialized.David Greenman1995-05-191-4/+4
| | | | | | | | | | 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 Notes: svn path=/head/; revision=8624