summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Stylistic overhaul of vnops tables.phk1997-10-153-339/+311
| | | | | | | 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.
* IN_HASHED goes in the in-core flags ip->i_flag, not in the on-disk flagsbde1997-10-151-4/+4
| | | | | | | | | ip->i_flags. Rev.1.18 completely broke ufs. My root directory went away about 10 seconds after booting. I think file system damage was null, since IN_HASHED = 0x80 is not used in the disk flags (it would probably be UF_SOMETHING if it were used).
* Reset the flag right away, could catch a bogon someday.phk1997-10-141-1/+2
|
* I think my previous change may have opened a race conditio.phk1997-10-145-13/+17
| | | | 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-143-8/+8
| | | | | | 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-128-13/+27
| | | | | | | | 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-113-3/+9
| | | | Substantial input from: bde
* Make ufs_reclaim free the underlying inode.phk1997-10-103-7/+15
|
* Use generic ufs_reclaim().phk1997-10-105-49/+18
|
* Add type arg to ffs_mountfs and avoid examining v_tag to find outphk1997-10-103-35/+17
| | | | | | if MFS is getting a free ride. Use generic ufs_reclaim().
* Clustered read and write are switched at mount-option level.kato1997-09-274-23/+24
| | | | | | | | | | | | | | | | 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 tqdisksort to bufqdisksort. Honor the B_ORDERED buffer flaggibbs1997-09-211-77/+56
| | | | so that meta-data writes go out to the device in the right order.
* Update for new buffer queue data structure.gibbs1997-09-212-12/+12
|
* Change the M_NAMEI allocations to use the zone allocator. This changedyson1997-09-211-10/+10
| | | | | | | | plus the previous changes to use the zone allocator decrease the useage of malloc by half. The Zone allocator will be upgradeable to be able to use per CPU-pools, and has more intelligent usage of SPLs. Additionally, it has reasonable stats gathering capabilities, while making most calls inline.
* [Regarding the previous patch] This is completely wrong.phk1997-09-191-3/+5
| | | | | | | | | | | | | 1. ffs_alloc() actually allowed writing one block less one frag (normally 7 frags or 7/8 blocks) beyond the limit. 2. freebufspace() gives the free space in frags, but `size' is in bytes, so the change results in approximately `size' fragments too many being reserved. 3. ffs_realloccg() has the same bug but wasn't changed. PR: 3398 Submitted by: bde Eyeballed by: phk
* Ffs_alloc allow users to write one block beyond the limit.phk1997-09-181-2/+2
| | | | | | PR: 3398 Reviewed by: phk Submitted by: Wolfram Schneider <wosch@apfel.de>
* 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
|
OpenPOWER on IntegriCloud