summaryrefslogtreecommitdiffstats
path: root/sys/gnu/fs
Commit message (Collapse)AuthorAgeFilesLines
* Eradicate the variable "time" from the kernel, using various measures.phk1998-03-304-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "time" wasn't a atomic variable, so splfoo() protection were needed around any access to it, unless you just wanted the seconds part. Most uses of time.tv_sec now uses the new variable time_second instead. gettime() changed to getmicrotime(0. Remove a couple of unneeded splfoo() protections, the new getmicrotime() is atomic, (until Bruce sets a breakpoint in it). A couple of places needed random data, so use read_random() instead of mucking about with time which isn't random. Add a new nfs_curusec() function. Mark a couple of bogosities involving the now disappeard time variable. Update ffs_update() to avoid the weird "== &time" checks, by fixing the one remaining call that passwd &time as args. Change profiling in ncr.c to use ticks instead of time. Resolution is the same. Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call hzto() which subtracts time" sequences. Reviewed by: bde
* Moved some #includes from <sys/param.h> nearer to where they are actuallybde1998-03-282-0/+2
| | | | used.
* Add two new functions, get{micro|nano}time.phk1998-03-261-24/+1
| | | | | | | | | | | | They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments.
* Make this compile after soft updates integration.eivind1998-03-091-4/+4
| | | | LINTing forgotten by: julian
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-1/+10
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* The intent is to get rid of WILLRELE in vnode_if.src by makingmsmith1998-03-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a complement to all ops that return a vpp, VFS_VRELE. This is initially only for file systems that implement the following ops that do a WILLRELE: vop_create, vop_whiteout, vop_mknod, vop_remove, vop_link, vop_rename, vop_mkdir, vop_rmdir, vop_symlink This is initial DNA that doesn't do anything yet. VFS_VRELE is implemented but not called. A default vfs_vrele was created for fs implementations that use the standard vnode management routines. VFS_VRELE implementations were made for the following file systems: Standard (vfs_vrele) ffs mfs nfs msdosfs devfs ext2fs Custom union umapfs Just EOPNOTSUPP fdesc procfs kernfs portal cd9660 These implementations may change as VOP changes are implemented. In the next phase, in the vop implementations calls to vrele and the vrele part of vput will be moved to the top layer vfs_vnops and made visible to all layers. vput will be replaced by unlock in these cases. Unlocking will still be done in the per fs layer but the refcount decrement will be triggered at the top because it doesn't hurt to hold a vnode reference a little longer. This will have minimal impact on the structure of the existing code. This will only be done for vnode arguments that are released by the various fs vop implementations. Wider use of VFS_VRELE will likely require restructuring of the code. Reviewed by: phk, dyson, terry et. al. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Style nits and staticism with the previous commit.msmith1998-03-011-6/+6
| | | | Submitted by: bde
* Add local stup putpages/getpages routines.msmith1998-03-011-0/+33
| | | | Submitted by: Terry Lambert <terry@freebsd.org>
* Fixed configuration and linkage of ext2_checkoverlap().bde1998-02-132-8/+5
|
* Back out DIAGNOSTIC changes.eivind1998-02-067-12/+1
|
* Turn DIAGNOSTIC into a new-style option.eivind1998-02-047-1/+12
|
* Make LINT at least compile. This faithfully duplicate the changeseivind1998-02-041-8/+8
| | | | | done to ufs/ufs/ufs_vnops.c for the same problem, but I don't know if that will actually make SUIDDIR work for ext2fs.
* Retire LFS.phk1998-01-302-6/+2
| | | | | | | | | | | | If you want to play with it, you can find the final version of the code in the repository the tag LFS_RETIREMENT. If somebody makes LFS work again, adding it back is certainly desireable, but as it is now nobody seems to care much about it, and it has suffered considerable bitrot since its somewhat haphazard integration. R.I.P
* Add better support for larger I/O clusters, including larger physicaldyson1998-01-241-6/+38
| | | | | I/O. The support is not mature yet, and some of the underlying implementation needs help. However, support does exist for IDE devices now.
* Unspammed nested include of <vm/vm_zone.h>.bde1997-12-271-1/+1
|
* Convert SUIDDIR fully to a new-style option.eivind1997-12-151-0/+1
| | | | Forgotten by: julian
* Don't include <sys/lock.h> in headers when only `struct simplelock' isbde1997-12-053-0/+3
| | | | required. Fixed everything that depended on the pollution.
* Needs to include <sys/lock.h> if we're using struct lock.jkh1997-12-051-1/+2
|
* Fixed corruption of the per-group used directories count. It wasn'tbde1997-12-031-3/+4
| | | | | decremented when directories were removed because rev.1.12 broke the fixup of the i_mode of the inode being removed.
* Fix the copyright and attribution on this file. I forgot thisphk1997-12-021-0/+6
| | | | when the file was cloned.
* Use the same algorithm as ffs for generation numbers.bde1997-12-022-9/+3
|
* Removed __FreeBSD__ ifdefs.bde1997-12-0213-187/+0
|
* Fixed missing #include of "opt_quota.h".bde1997-11-241-508/+505
| | | | | | Sorted the functions into the same order as in ufs_vnops.c so that this can be compared with the latter without getting 2627 lines of diffs. Now we get only 1920 lines of diffs.
* Fixed overflow in ufs_getblns(). For ufs on systems with 32-bit ints,bde1997-11-241-7/+14
| | | | | | | | | | triple indirect blocks only worked for block sizes of 4K, since MNINDIR(ump)**3 overflows for larger block sizes (e.g., (8192/4)**3 = 2**33 > INT_MAX). This fix is not the obvious one of changing some types to 64 bits. It rearranges the code to avoid some unnecessary 64-bit calculations. Reviewed by: Kirk McKusick <mckusick@McKusick.COM>
* Use consistent description strings for M_EXT2NODE. This also fixes abde1997-11-201-1/+1
| | | | spelling error in the unused string.
* Give ext2fs it's own VOP_REMOVE, VOP_LINK, VOP_RENAME, VOP_MKDIR, VOP_RMDIR,phk1997-11-181-0/+1020
| | | | VOP_CREATE, VOP_MKNOD, VOP_SYMLINK and ext2_makeinode().
* Reviewed by: various.julian1997-11-121-1/+1
| | | | | | | | | | | | | | | | Ever since I first say the way the mount flags were used I've hated the fact that modes, and events, internal and exported, and short-term and long term flags are all thrown together. Finally it's annoyed me enough.. This patch to the entire FreeBSD tree adds a second mount flag word to the mount struct. it is not exported to userspace. I have moved some of the non exported flags over to this word. this means that we now have 8 free bits in the mount flags. There are another two that might well move over, but which I'm not sure about. The only user visible change would have been in pstat -v, except that davidg has disabled it anyhow. I'd still like to move the state flags and the 'command' flags apart from each other.. e.g. MNT_FORCE really doesn't have the same semantics as MNT_RDONLY, but that's left for another day.
* Removed unused #includes. The need for most of them went away withbde1997-10-271-5/+0
| | | | recent changes (docluster* and vfs improvements).
* I guess nobody uses ext2fs in current ?phk1997-10-261-0/+1
| | | | vop_lookup is back now, don't know whan I lost it.
* Make a set of VOP standard lock, unlock & islocked VOP operators, whichphk1997-10-171-2/+2
| | | | | depend on the lock being located at vp->v_data. Saves 3x3 identical vop procs, more as the other filesystems becomes lock aware.
* Another VFS cleanup "kilo commit"phk1997-10-167-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Remove VOP_UPDATE, it is (also) an UFS/{FFS,LFS,EXT2FS,MFS} intereface function, and now lives in the ufsmount structure. 2. Remove VOP_SEEK, it was unused. 3. Add mode default vops: VOP_ADVLOCK vop_einval VOP_CLOSE vop_null VOP_FSYNC vop_null VOP_IOCTL vop_enotty VOP_MMAP vop_einval VOP_OPEN vop_null VOP_PATHCONF vop_einval VOP_READLINK vop_einval VOP_REALLOCBLKS vop_eopnotsupp And remove identical functionality from filesystems 4. Add vop_stdpathconf, which returns the canonical stuff. Use it in the filesystems. (XXX: It's probably wrong that specfs and fifofs sets this vop, shouldn't it come from the "host" filesystem, for instance ufs or cd9660 ?) 5. Try to make system wide VOP functions have vop_* names. 6. Initialize the um_* vectors in LFS. (Recompile your LKMS!!!)
* VFS mega cleanup commit (x/N)phk1997-10-169-74/+70
| | | | | | | | | | | | | | | | | | | | | | | 1. Add new file "sys/kern/vfs_default.c" where default actions for VOPs go. Implement proper defaults for ABORTOP, BWRITE, LEASE, POLL, REVOKE and STRATEGY. Various stuff spread over the entire tree belongs here. 2. Change VOP_BLKATOFF to a normal function in cd9660. 3. Kill VOP_BLKATOFF, VOP_TRUNCATE, VOP_VFREE, VOP_VALLOC. These are private interface functions between UFS and the underlying storage manager layer (FFS/LFS/MFS/EXT2FS). The functions now live in struct ufsmount instead. 4. Remove a kludge of VOP_ functions in all filesystems, that did nothing but obscure the simplicity and break the expandability. If a filesystem doesn't implement VOP_FOO, it shouldn't have an entry for it in its vnops table. The system will try to DTRT if it is not implemented. There are still some cruft left, but the bulk of it is done. 5. Fix another VCALL in vfs_cache.c (thanks Bruce!)
* Two more places where root filesystems were mounted, put them at the head ofjulian1997-10-161-1/+1
| | | | the mount list in case there is already DEVFS present.
* vnops megacommitphk1997-10-151-107/+3
| | | | | | | | | | 1. Use the default function to access all the specfs operations. 2. Use the default function to access all the fifofs operations. 3. Use the default function to access all the ufs operations. 4. Fix VCALL usage in vfs_cache.c 5. Use VOCALL to access specfs functions in devfs_vnops.c 6. Staticize most of the spec and fifofs vnops functions. 7. Make UFS panic if it lacks bits of the underlying storage handling.
* Hmm, realign the vnops into two columns.phk1997-10-151-21/+21
|
* Stylistic overhaul of vnops tables.phk1997-10-151-129/+127
| | | | | | | 1. Remove comment stating the blatantly obvious. 2. Align in two columns. 3. Sort all but the default element alphabetically. 4. Remove XXX comments pointing out entries not needed.
* I think my previous change may have opened a race conditio.phk1997-10-142-3/+2
| | | | This patch does the same thing, with no change in semantics.
* ufs_ihashrem() should not be called from the UFS layer, but from thephk1997-10-141-0/+2
| | | | | | lower layer (LFS/FFS/?) like the rest of the ihash functions. Otherwise it is impossible to make a lower layer that doesn't use the ihash facility.
* Last major round (Unless Bruce thinks of somthing :-) of malloc changes.phk1997-10-122-2/+7
| | | | | | | | Distribute all but the most fundamental malloc types. This time I also remembered the trick to making things static: Put "static" in front of them. A couple of finer points by: bde
* Distribute and statizice a lot of the malloc M_* types.phk1997-10-111-1/+1
| | | | Substantial input from: bde
* Make ufs_reclaim free the underlying inode.phk1997-10-101-1/+2
|
* Mega commit to cleanup the "remaining nits" after my malloc change.phk1997-10-102-10/+8
| | | | | Introduce a M_EXT2NODE for ext2fs vnodes. Use generic ufs_reclaim instead of hijacking ffs_reclaim.
* `numdirtybuffers' was not maintained properly. This caused excessivebde1997-10-071-2/+4
| | | | | flushing of buffers in an attempt to reduce numdirtybuffers, and perhaps other problems.
* Oops, include <sys/conf.h>.kato1997-09-281-0/+1
| | | | Reminded-by: Simon Shapiro <Shimon@i-Connect.Net>
* Clustered read and write are switched at mount-option level.kato1997-09-274-28/+18
| | | | | | | | | | | | | | | | 1. Clustered I/O is switched by the MNT_NOCLUSTERR and MNT_NOCLUSTERW bits of the mnt_flag. The sysctl variables, vfs.foo.doclusterread and vfs.foo.doclusterwrite are deleted. Only mount option can control clustered I/O from userland. 2. When foofs_mount mounts block device, foofs_mount checks D_CLUSTERR and D_CLUSTERW bits of the d_flags member in the block device switch table. If D_NOCLUSTERR / D_NOCLUSTERW are set, MNT_NOCLUSTERR / MNT_NOCLUSTERW bits will be set. In this case, MNT_NOCLUSTERR and MNT_NOCLUSTERW cannot be cleared from userland. 3. Vnode driver disables both clustered read and write. 4. Union filesystem disables clutered write. Reviewed by: bde
* Make MFS a supported option, finally.joerg1997-09-221-3/+1
|
* Convert select -> poll.peter1997-09-141-3/+5
| | | | | Delete 'always succeed' select/poll handlers, replaced with generic call. Flag missing vnode op table entries.
* Remove some stuff from lookup which is now handled centrally.phk1997-09-101-11/+0
|
* Removed yet more vestiges of config-time swap configuration and/orbde1997-09-071-6/+4
| | | | cleaned up nearby cruft.
* Removed unused #includes.bde1997-09-021-3/+1
|
OpenPOWER on IntegriCloud