aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Correct bounds checking error in FFS filesize limits.Chris D. Faulhaber2002-07-311-0/+3
| | | | Notes: svn path=/releng/4.6/; revision=101098
* This commit was manufactured by cvs2svn to create branch 'RELENG_4_6'.cvs2svn2002-07-032-14/+7
| | | | Notes: svn path=/releng/4.6/; revision=99348
* Enforce a 2^31 * PAGE_SIZE file size limit to ensure that largeIan Dowse2002-06-231-0/+3
| | | | | | | | | | | | | | | files cannot overflow the vm_pindex_t type. This is not an MFC, since increasing the size of vm_pindex_t as was done in -CURRENT is not useful or appropriate for RELENG_4. Note that on the alpha platform this change is not necessary because vm_pindex_t is 64-bit, but limiting files to 16TB there is unlikely to cause any problems. Submitted by: tegge Notes: svn path=/stable/4/; revision=98711
* MFC 1.90. Fix a major performance issue that was introduced in lateMatthew Dillon2002-06-221-7/+11
| | | | | | | | | | | | | | | | | | | | | 2000. Setting B_CLRBUF for the BALLOC call unexpectedly caused BALLOC to issue a read-before-write for each fs block, resulting in a huge (4x) performance penalty due to extra I/Os and lack of clustering. This workaround avoids the unnecessary read resulting in full write clustering performance to media. It is expected to have major visible effects only on large news systems (e.g. INN cyclic buffers), and databases, especially on hardware RAID systems (10x), and has already been shown to have a huge positive effect on INN. Most other programs use write-append which is already optimal. This patch does not fix the double-memory-copy to the filesystem buffer. That is a more difficult problem and is being worked on as a separate issue. Reviewed by: mckusick, tegge Notes: svn path=/stable/4/; revision=98626
* MFC 1.10: Minor dirhash tweaking (more aggressive cleaning, better hash).David Malone2002-04-101-3/+15
| | | | Notes: svn path=/stable/4/; revision=94388
* MFC (ext2_vfsops.c 1.91, cd9660_vfsops.c 1.98, ffs_vfsops.c 1.173: setBruce Evans2002-04-081-1/+1
| | | | | | | | | si_iosize_max correctly in ffs, and don't forget to set it in cd9660 and ext2fs (the original log message mistakenly said msdosfs instead of cd9660)). Notes: svn path=/stable/4/; revision=94185
* MFC: 1.8; Fix a bug in ufsdirhash_adjfree() that caused it toIan Dowse2002-03-181-10/+7
| | | | | | | incorrectly update the free-space statistics in some cases. Notes: svn path=/stable/4/; revision=92582
* MFC b_resid KASSERT from 1.85. This is a safety check to make sureMatthew Dillon2002-03-061-0/+6
| | | | | | | | | | | | | | | | | that b_resid is the expected 0 value in preparation for a future commit that will remove the b_resid calculation entirely. It turns out that b_resid WILL always be 0 except for the case where a write fails. But in the write failure case the buffer is still valid for reading and we still want to treat it as such (as if b_resid were 0, even though it isn't). The filesystem code should not use b_resid in any calculations except those involving short-read situations, and even then b_resid will not be persistent for a VMIO backed buffer since the buffer may be destroyed and later reconstituted, resetting b_resid to 0. short-reads are not used by most filesystems. They are used by NFS only when reading softlinks (using a non VMIO buffer). Joy. Notes: svn path=/stable/4/; revision=91767
* MFC 1.85 syntax cleanup only.Matthew Dillon2002-03-061-4/+5
| | | | Notes: svn path=/stable/4/; revision=91764
* MFC 1.104 - fix bug where spl saved in softupdates lock could get stomped byMatthew Dillon2002-02-051-38/+76
| | | | | | | | | another process. Approved by: mckusick Notes: svn path=/stable/4/; revision=90251
* MFC vfs_subr 1.338 and friends. When downgrading a filesystem to read-only,Matthew Dillon2002-02-054-8/+17
| | | | | | | | | operatings involving file removal and file update were not always being fully comitted to disk, resulting in corruption. Approved by: mckusick Notes: svn path=/stable/4/; revision=90250
* MFC 1.103. drain_output() must be called prior to checking forMatthew Dillon2002-02-051-8/+10
| | | | | | | | dirty buffers or we may get an incorrect indication, resulting in a later panic. Notes: svn path=/stable/4/; revision=90235
* MFC 1.50: don't mangle the quota hashlist after an unmount.Poul-Henning Kamp2002-01-151-1/+2
| | | | Notes: svn path=/stable/4/; revision=89388
* MFC the following:Matthew Dillon2001-12-251-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * LK_TIMEOUT lock flag to separate lock acquisition with and without a timeout (dillon) * use of LK_TIMEOUT in BUF_TIMELOCK to avoid timeout race aginst BUF_LOCK (dillon) * use of LK_TIMEOUT in pageout vget() code to avoid deadlock (dillon) * move vnode reclaim into its own kthread to avoid deadlocks (Yahoo) * remove 'VXLOCK interlock avoided' messages.. they can occur under normal operation and create a choking hazzard on the console. * Adjust VMIGHTFREE macro used with vnode reclaim code to avoid eating large amounts of cpu with little to show for it in certain situations. * Add VREF/VRELE around UFS_UPDATE() call to avoid update/reclaim race (note: snuck in at last minute but I accidently did a partial commit a moment ago and the tree is broken until I commit the rest of it). This is minor and will be tested heavily. Approved by: Release Engineers Notes: svn path=/stable/4/; revision=88467
* MFC 1.73 - fix softupdates panic easily produced on NFS server by NFS client.Matthew Dillon2001-12-201-0/+13
| | | | | | | | | (Jordan's 'Make your FreeBSD box fall over' bug). Approved by: Release Engineers Notes: svn path=/stable/4/; revision=88315
* MFC: r1.168,r1.169; kqueue filter updates for ufs.Jonathan Lemon2001-12-141-0/+41
| | | | Notes: svn path=/stable/4/; revision=87949
* MFC: When mkdir()-ing, the parent dir gets is linkcount increased.Guido van Rooij2001-11-261-1/+1
| | | | | | | Fix VN_KNOTE to reflect that. Notes: svn path=/stable/4/; revision=86919
* MFC: 1.7; fix a typo that effectively disabled the sequential-accessIan Dowse2001-11-211-1/+1
| | | | | | | optimisation. Notes: svn path=/stable/4/; revision=86731
* MFC: 1.67; get rid of spurious check in ffs_truncate for i_size ==Ian Dowse2001-11-201-2/+0
| | | | | | | | | length which fails to set the modification time on the file. Reminded by: Donal Diamond <donal.diamond@eircom.net> Notes: svn path=/stable/4/; revision=86702
* MFC B_NOWDRAIN. This required moving B_AUTOCHAINDONE from flags to xflagsMatthew Dillon2001-11-181-0/+2
| | | | | | | | (B_ -> BX_). Modify the VN device to use IO_NOWDRAIN (MFC from similar change in -current's MD device). Notes: svn path=/stable/4/; revision=86541
* MFC: 1.6; default to not performing ufs_dirhash's directory-blockIan Dowse2001-11-051-1/+1
| | | | | | | sanity check after every directory modification. Notes: svn path=/stable/4/; revision=86085
* MFC implement kern.maxvnodes (primarily kern/vfs_subr.c 1.326), sync,Matthew Dillon2001-11-031-11/+16
| | | | | | | | | | | | | | | | | | | | and other VM optimizations and fixes. * Add VOBJDIRTY flag to vnode to avoid certain indirections. * Turn the mount structure vnode list into an LRU queue (LIST -> TAILQ) * Attempt to reuse vnodes when we hit the maxvnodes limit * Optimize msync() to avoid unnecessary v_interlocks * Optimize ffs_sync() for same * Fix vm_object double-termination bug * Add KASSERT to ensure that backing object is not freed out from under remaining VM pages. These fixes change the mount structure and will create a binary kld module incompatibility with filesystem kld's, but I deem the scaling issues with 4.x that we are fixing to be more important. Notes: svn path=/stable/4/; revision=85987
* MFC change vnode list under mount point from LIST to TAILQ in preparationMatthew Dillon2001-10-252-13/+13
| | | | | | | for scaleability fixes for machines with >= 2G of ram coming down the pipe. Notes: svn path=/stable/4/; revision=85499
* MFC: 1.25, 1.27; don't allow NFS filehandle lookups to succeed on anIan Dowse2001-10-141-1/+4
| | | | | | | | inode whose effective link count is zero, since the file is really gone from the system (ext2fs issue in 1.17.2.1 has been resolved). Notes: svn path=/stable/4/; revision=84925
* MFC: Bring sizeof(struct inode) back to 256 bytes by reducing theIan Dowse2001-09-291-1/+1
| | | | | | | size of i_spare[] and making ext2fs use a spare dinode field instead. Notes: svn path=/stable/4/; revision=84135
* MFC: 1.54; When compacting directories, don't use DIRSIZ() on unusedIan Dowse2001-09-221-11/+29
| | | | | | | | | (d_ino == 0) entries since the result is meaningless. This avoids an obscure directory corruption problem that is extremely unlikely to occur in practice. Notes: svn path=/stable/4/; revision=83830
* MFC dirpref code, including patches that deal with old fsck's clearingMatthew Dillon2001-09-213-21/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | dirpref fields in the superblock and alternative superblock errors reported due to the fields added to the superblock. Additionally, MFCd the space reservation and fsck/superblock support in the superblock for snapshots so the -stable fsck remains compatible with the -current fsck. The following has been MFC'd: 1.36 src/sbin/newfs/mkfs.c 1.35 src/sbin/newfs/newfs.c 1.16 src/sbin/tunefs/tunefs.c 1.75 src/sys/ufs/ffs/ffs_alloc.c 1.144, 1.148, 1.159 src/sys/ufs/ffs/ffs_vfsops.c 1.20 src/sys/ufs/ffs/fs.h 1.37 src/sbin/newfs/newfs.8 1.15 src/sbin/tunefs/tunefs.8 1.22, 1.25 src/sbin/fsck_ffs/setup.c (note: fsck/setup.c in -stable) Reviewed by: iedowse, silby, mckusick Notes: svn path=/stable/4/; revision=83785
* MFC: Ensure that we don't use dirhash on directories that have beenIan Dowse2001-08-282-0/+13
| | | | | | | | | removed. Approved by: jkh Notes: svn path=/stable/4/; revision=82467
* MFC: 1.53; don't call ufsdirhash_move() on the unused directoryIan Dowse2001-08-221-1/+1
| | | | | | | | | entries that fsck leaves behind. Approved by: jkh Notes: svn path=/stable/4/; revision=82146
* MFC: Directory hashing for better performance on large directories.Ian Dowse2001-08-015-99/+108
| | | | | | | | This is turned off by default; to enable it, add "options UFS_DIRHASH" to the kernel config file. Notes: svn path=/stable/4/; revision=80936
* This commit was manufactured by cvs2svn to create branch 'RELENG_4'.cvs2svn2001-07-281-0/+1058
| | | | Notes: svn path=/stable/4/; revision=80495
* MFC: Change the interface to vflush() so that it can deal withIan Dowse2001-07-261-2/+2
| | | | | | | | | | | | | | | | extra references on the filesystem root vnode. This fixes bugs in a number of filesystems that could cause forced umounts to erroneously return EBUSY, and it centralises a lot of xxx_unmount logic. This unfortunately requires the recompilation of any filesystem KLDs, although I have added an extra sanity check that should help to avoid panics if old modules are used (the filesystem may refuse to umount, and if so, a warning message will appear on the console). Not objected to by: -stable Notes: svn path=/stable/4/; revision=80411
* Back out revision 1.17.2.1 (return ESTALE if i_effnlink is zero)Ian Dowse2001-07-261-3/+1
| | | | | | | | | | until an interaction with ext2fs is resolved. ext2fs doesn't maintain i_effnlink, so this broke NFS exporting of ext2fs filesystems. Noticed by: bde Notes: svn path=/stable/4/; revision=80402
* MFC: 1.25; Don't allow NFS filehandle lookups to succeed on anIan Dowse2001-07-251-1/+3
| | | | | | | | | inode whose effective link count is zero, since the file is really gone from the system. This could happen when soft-updates delays the actual freeing of the inode. Notes: svn path=/stable/4/; revision=80337
* This commit was manufactured by cvs2svn to create branch 'RELENG_4'.cvs2svn2001-07-151-0/+125
| | | | Notes: svn path=/stable/4/; revision=79756
* Back out bandaid now that vop_noislocked has been lobotomized.Tor Egge2001-07-042-2/+0
| | | | Notes: svn path=/stable/4/; revision=79227
* After the last nullfs MFC filesystems need to start their per-vnode privateTor Egge2001-07-032-0/+2
| | | | | | | | | | data with a struct lock unless they override VOP_LOCK/VOP_UNLOCK and VOP_ISLOCKED. Reviewed by: dillon Notes: svn path=/stable/4/; revision=79152
* MFC: the rest of fixes for nullfs. Please note, that for now onlyBoris Popov2001-06-261-0/+4
| | | | | | | | | | ufs mounts can be used for null mounts. msdosfs and cd9660fs fixes are trivial and will be committed shortly. Null mounts on top of nfs filesystem will cause problems after rename() operation. This issue also present in -current and can be fixed too. Notes: svn path=/stable/4/; revision=78800
* Correct a spelling error in a comment.Dima Dorfman2001-06-171-1/+1
| | | | Notes: svn path=/stable/4/; revision=78386
* MFC Tor's O_DIRECT patch with some modifications. As with the commit toMatthew Dillon2001-06-031-9/+32
| | | | | | | | | | -current, this patch only addresses about 80% of the issues involved. Discussed on: arch Obtained from: Tor.Egge@fast.no Notes: svn path=/stable/4/; revision=77647
* MFC: rev 1.56 - MFS should know about every VOP.Boris Popov2001-05-221-0/+3
| | | | Notes: svn path=/stable/4/; revision=76952
* MFC: turn dkcksum() into an __inline functionDavid E. O'Brien2001-03-051-17/+0
| | | | Notes: svn path=/stable/4/; revision=73591
* MFC 1.88 - free lock in early return. This can occur if we block gettingMatthew Dillon2001-03-021-1/+3
| | | | | | | | the lock and another process deals with the worklist before we do. (obvious bug, so quick MFC) Notes: svn path=/stable/4/; revision=73352
* MFC 1.82, 1.83, 1.84 (convert manual loops to LIST/FOREACH macros)Matthew Dillon2001-02-281-110/+234
| | | | | | | | | | | MFC 1.85, 1.86, 1.87 - fixes for inodedep races, done check, and making sure we free the lock before panicing. Testing by: ps, peter, dillon Approved by: mckusick Notes: svn path=/stable/4/; revision=73208
* MFC: sync kq up to current (extend to device layer, plus other fixes)Jonathan Lemon2001-02-261-0/+86
| | | | Notes: svn path=/stable/4/; revision=73061
* MFC: Improve detection and handling of ffs directory corruption.Ian Dowse2001-02-101-2/+3
| | | | | | | | 1.44: Fix test for a read-only filesystem in ufs_dirbad(). 1.45: Check that directory entries fit within their DIRBLKSIZ block. Notes: svn path=/stable/4/; revision=72324
* MFC 1.81, fix race between syncer and umount.Matthew Dillon2001-02-021-12/+42
| | | | Notes: svn path=/stable/4/; revision=71942
* MFC: Avoid superblock corruption on very large filesystems.Ian Dowse2001-01-222-33/+32
| | | | Notes: svn path=/stable/4/; revision=71385
* MFC: logging of /dev/console output to syslogd. Disabled by default.Poul-Henning Kamp2001-01-161-1/+0
| | | | Notes: svn path=/stable/4/; revision=71109
* MFC: Always printf diskerrors.Poul-Henning Kamp2001-01-091-14/+9
| | | | Notes: svn path=/stable/4/; revision=70844