summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Convert select -> poll.peter1997-09-146-34/+44
| | | | | Delete 'always succeed' select/poll handlers, replaced with generic call. Flag missing vnode op table entries.
* Update the comment and remove checks now done centrally.phk1997-09-101-16/+16
|
* Removed yet more vestiges of config-time swap configuration and/orbde1997-09-073-18/+10
| | | | cleaned up nearby cruft.
* Removed unused #includes.bde1997-09-0211-58/+11
|
* Change the 0xdeadb hack to a flag called VDOOMED.phk1997-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | Introduce VFREE which indicates that vnode is on freelist. Rename vholdrele() to vdrop(). Create vfree() and vbusy() to add/delete vnode from freelist. Add vfree()/vbusy() to keep (v_holdcnt != 0 || v_usecount != 0) vnodes off the freelist. Generalize vhold()/v_holdcnt to mean "do not recycle". Fix reassignbuf()s lack of use of vhold(). Use vhold() instead of checking v_cache_src list. Remove vtouch(), the vnodes are always vget'ed soon enough after for it to have any measuable effect. Add sysctl debug.freevnodes to keep track of things. Move cache_purge() up in getnewvnodes to avoid race. Decrement v_usecount after VOP_INACTIVE(), put a vhold() on it during VOP_INACTIVE() Unmacroize vhold()/vdrop() Print out VDOOMED and VFREE flags (XXX: should use %b) Reviewed by: dyson
* Uncut&paste cache_lookup().phk1997-08-263-57/+7
| | | | | | | | | | | | | | | This unifies several times in theory indentical 50 lines of code. The filesystems have a new method: vop_cachedlookup, which is the meat of the lookup, and use vfs_cache_lookup() for their vop_lookup method. vfs_cache_lookup() will check the namecache and pass on to the vop_cachedlookup method in case of a miss. It's still the task of the individual filesystems to populate the namecache with cache_enter(). Filesystems that do not use the namecache will just provide the vop_lookup method as usual.
* Back out some incorrect changes that was worse than the original bug.dyson1997-08-262-11/+3
|
* Renamed doclusterread/write to unique names (ffs_doclusterread/write),kato1997-08-252-9/+11
| | | | | | | and staticize them. Move the #include of <sys/sysctl.h> to the top of the file. Pointed out by: Bruce Evans <bde@zeta.org.au>
* Fix the "remove optimization" by removing it. Sorry for the trouble.dyson1997-08-221-1/+3
|
* This is a trial improvement for the vnode reference count while on the vnodedyson1997-08-221-2/+2
| | | | | | free list problem. Also, the vnode age flag is no longer used by the vnode pager. (It is actually incorrect to use then.) Constructive feedback welcome -- just be kind.
* Performance improvment to minimize delayed write output of filesdyson1997-08-211-1/+7
| | | | | that have been deleted. Submitted by: Peter M. Chen <pmchen@eecs.umich.edu>
* Fix all areas of the system (or at least all those in LINT) to avoid storingwollman1997-08-165-16/+16
| | | | | | | | socket addresses in mbufs. (Socket buffers are the one exception.) A number of kernel APIs needed to get fixed in order to make this happen. Also, fix three protocol families which kept PCBs in mbufs to not malloc them instead. Delete some old compatibility cruft while we're at it, and add some new routines in the in_cksum family.
* We got a couple of "map mismatch" panics from the followingphk1997-08-041-2/+2
| | | | | | | | | | | | | code. According to the crash dump, bpref is set to 445 and cgp->cg_nclusterblks is 444. Hence in the for loop, the test fails immediately but the following failure check (got == cgp->cg_nclusterblks) doesn't trigger because got > cgp->cg_nclusterblks. This wreaks havoc in the code after that. Fix: Move one source bit to the left :-) Noticed by: Mike Hibler <mike@fast.cs.utah.edu> Submitted by: Kirk McKusick <mckusick@McKusick.COM>
* Removed unused #includes.bde1997-08-0211-50/+11
|
* Always mark st_ctime for update upon successful completion ofbde1997-07-131-7/+4
| | | | | | | | | | | | | | | | | | | | | chown(). Previously, it wasn't marked for null chown()'s. We permit null chown()s as a special case of "appropriate privilege" - everyone has enough priviilege to not change ids (this is a better argument than the one I gave for rev.1.13, that null changes aren't really changes). However, POSIX.1 requires the update independently of whether anything has changed. Clear both the setuid and the setgid bits upon successful completion of non-null chown()s by non-root. Previously, the setuid bit was only changed for non-null changes of the uid, etc. POSIX.1 requires clearing both unless the call was made by a process with "appropriate privilege", in which case altering the bits is implementation-defined. We define appropriate privilege as `process is root, or the change is null', and the implementation-defined behaviour as not altering the bits. There is no interpretation that permits clearing only one of the bits. Reviewed by: jdp
* Use the correct size for a sector in the search for a label inbde1997-07-131-3/+3
| | | | readdisklabel(). Sectors may be larger than DEV_BSIZE.
* Removed semicolon from the end of a #define.bde1997-07-131-2/+2
|
* Fixed comment about i_spare.bde1997-07-131-2/+2
|
* Fix a problem with the VN device. Specifically, the VN device candyson1997-06-152-2/+13
| | | | | | | | | | cause a problem of spiraling death due to buffer resource limitations. The vfs_bio code in general had little ability to handle buffer resource management, and now it does. Also, there are a lot more knobs for tuning the vfs_bio code now. The knobs came free because of the need that there always be some immediately available buffers (non-delayed or locked) for use. Note that the buffer cache code is much less likely to get bogged down with lots of delayed writes, even more so than before.
* Submitted by: Whistle Communications (archie Cobbs)julian1997-06-021-7/+11
| | | | | | | | | | | | | | | | | | These changes add the ability to specify that a UFS file/directory cannot be unlinked. This is basically a scaled back version of the IMMUTABLE flag. The reason is to allow an administrator to create a directory hierarchy that a group of users can arbitrarily add/delete files from, but that the hierarchy itself is safe from removal by them. If the NOUNLINK definition is set to 0 then this results in no change to what happens normally. (and results in identical binary (in the kernel)). It can be proven that if this bit is never set by the admin, no new behaviour is introduced.. Several "good idea" comments from reviewers plus one grumble about creeping featurism. This code is in production in 2.2 based systems
* Fix warnings (from LINT). Missing static prototype, missing vm includespeter1997-05-251-1/+9
| | | | for vnode_pager_setsize().
* Shrink struct inode by 20 bytes, so that malloc wastes less space.phk1997-05-221-2/+2
| | | | Pointed out by: bde
* Remove redundant check for vp == dvp (done in VFS before calling).phk1997-05-171-9/+2
|
* Mount MFS read/write as in days of yore.jkh1997-04-281-1/+4
|
* Use smalllblktosize() instead of multiplying small block numbersbde1997-04-101-4/+4
| | | | | by fs->fs_bsize. The macro is usually faster and makes it clearer that the multiplication can't overflow.
* Removed nested include of <ufs/ufs/dir.h>. Use the pre-Lite2 hack ofbde1997-04-011-2/+6
| | | | | | | | | | defining doff_t both here and in <ufs/ufs/dir.h> so that this file is independent of <ufs/ufs/dir.h>. It still has old prerequisites <sys/param.h> and <ufs/ufs/quota.h>, and a new Lite2 prerequisite of <sys/lock.h>, sigh. This might fix lsof, which was broken by namespace pollution giving conflicting definitions of DIRBLKSIZ.
* Treat symlinks as first class citizens with their own uid/gid rather thanpeter1997-03-312-7/+3
| | | | | | | | | | | | | as shadows of their containing directory. This should solve the problem of users not being able to delete their symlinks from /tmp once and for all. Symlinks do not have modes though, they are accessable to everything that can read the directory (as before). They are made to show this fact at lstat time (they appear as mode 0777 always, since that's how the the lookup routines in the kernel treat them). More commits will follow, eg: add a real lchown() syscall and man pages.
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-243-6/+3
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Fixed corrupted newline and corrupted tab in previous commit.bde1997-03-241-2/+3
|
* Add generation number randomization. Newly created filesystems wil nowguido1997-03-233-16/+11
| | | | | | | | | automatically have random generation numbers. The kenel way of handling those also changed. Further it is advised to run fsirand on all your nfs exported filesystems. the code is mostly copied from OpenBSD, with the randomization chanegd to use /dev/urandom Reviewed by: Garrett Obtained from: OpenBSD
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-233-6/+6
| | | | | 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-229-21/+21
| | | | | | 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.
* Backed out rev.1.27, which broke unmounting of mfs and caused panicsbde1997-03-221-2/+2
| | | | | | on shutdown. Should not have been in 2.2 (the buggy last minute change, that is).
* MAXDIRSIZE is (or would be) used in fsck. It's a sanity check.peter1997-03-181-4/+1
|
* Restore the lost MNT_LOCAL flag twiddle. Lite2 has a different mechanismpeter1997-03-181-1/+3
| | | | | | | | | | | of setting it (compiled into vfs_conf.c), but we have a dynamic system in place. This could probably be better done via a runtime configure flag in the VFS_SET() VFS declaration, perhaps VFCF_LOCAL, and have the VFS code propagate this down into MNT_LOCAL at mount time. The other FS's would need to be updated, havinf UFS and MSDOSFS filesystems without MNT_LOCAL breaks a few things.. the man page rebuild scans for local filesystems and currently fails, I suspect that other tools like find and tar with their "local filesystem only" modes might be affected.
* Fix support for != 512 byte sector devices.sos1997-03-151-2/+2
| | | | | | | | | Restores the use of SBLOCK instead of the BSOFF/sectorsize calculation. Using SBLOCK is bogus however in that it uses DEV_BSIZE instead of the actual sector size, but that is taken care of in other places. Changing the SBLOCK would be better, but it affects the system in other places, and doing it this way makes it possible to use filesystems that was made before the lite2 merge.
* Update a number of routines to reflect the actual namempp1997-03-094-16/+16
| | | | of the routine that caused the panic.
* Update a number of panic messages to reflect the actual namempp1997-03-093-11/+11
| | | | of the routine that caused the panic.
* Supply the mount point given to mfs_mount when getting a vnode for themsmith1997-03-051-2/+2
| | | | | | | | | mount. This may have been a contributor to the 'null v_mount in fsync()' problem This is another, perhaps slightly less urgent, 2.2 last-minute candidate. Reviewed by: sef
* Fixed connection of vfs.ffs node to the sysctl tree.bde1997-03-041-2/+2
|
* Removed unused flag IN_RECURSE and unused struct member i_lockcount.bde1997-03-031-3/+1
|
* Removed useless setting of IN_RECURSE. The (anti) locking for this needsbde1997-03-031-9/+1
| | | | to be done in a different way, if at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2242-42/+42
| | | | ready for it yet.
* This now uses queue macros. Include <sys/queue.h> if !KERNEL to preservebde1997-02-181-0/+4
| | | | the documented interface.
* Removed FIFO ifdef again (see rev.1.5).bde1997-02-131-2/+0
|
* Add function prototypes for most of the new Lite2 functions.mpp1997-02-122-0/+4
| | | | | | Also made a few of the miscfs routines static to be consistent. Some modules simply required some additional #includes to remove -Wall warnings.
* Correct the new Lite2 #ifdef DIAGNOSTIC ffs_checkblk routinempp1997-02-101-11/+8
| | | | | | | | | | | | | to not return without setting a return value when it can't read a block error or detects a bad cylinder group, since the caller is expecting a return value. It will now panic at this point, since the thing to do in this case would be to return a "bad block" status to the caller, and the caller will panic anyways when that happens. Also updated to panic strings in this routine to read "ffs_checkblk: ..." instead of "checkblk: ...".
OpenPOWER on IntegriCloud