summaryrefslogtreecommitdiffstats
path: root/sys/ufs
Commit message (Collapse)AuthorAgeFilesLines
* Revert previous to this file before an actual request is made.trhodes2006-04-221-0/+12
|
* Remove what I believe are two useless ifdefs. If a user or administratortrhodes2006-04-211-12/+0
| | | | | | | | | | enables multilabel, or any option for that matter, most likely they have a reason. This will allow users to see that mulilabel is enabled via an issued "mount" command and remove an annoying warning - printed only when a MAC kernel is not installed - on boot up. Discussed with: green, brueffer, Samy Al Bahra. Probably ran past: csjp (though I can't remember).
* Fix panic() message to give the right function name.kensmith2006-04-171-1/+1
|
* Eliminate softdep_flush() livelock by accounting for number of worklist itemstegge2006-04-032-1/+7
| | | | marked as being in progress.
* - Release the references acquired by VOP_GETWRITEMOUNT and vfs_getvfs().jeff2006-03-312-1/+7
| | | | | | Discussed with: tegge Tested by: kris Sponsored by: Isilon Systems, Inc.
* Allow compilation when not using softupdates.tegge2006-03-191-2/+0
|
* Let snapshots make a copy of old contents for all buffers taking part in ategge2006-03-191-11/+38
| | | | | | | | cluster instead of just the first buffer. Delay buf_start() calls until snapshots have a copy of old content. PR: kern/93942
* Add kludge to avoid deadlock when unlinking snapshot.tegge2006-03-191-0/+16
|
* Reduce probability of unmount failing after having unmounted snapshots.tegge2006-03-191-0/+1
|
* Ensure that vnode for directory isn't reclaimed before ffs_snapshot() hastegge2006-03-191-4/+3
| | | | | completed expunging unlinked files. It could come back at another memory location causing a lock order reversal.
* - Remove the call to softdep_waitidle after suspending the filesystem.jeff2006-03-121-7/+0
| | | | | | | | This does not do what I wanted as all dirty buffers must be flushed by the call to ffs_sync and any remaining dependency work would mean that this failed. Pointed out by: tegge
* - Remove the call to softdep_waitidle after suspending the filesystem.jeff2006-03-121-0/+3
| | | | | | | | This does not do what I wanted as all dirty buffers must be flushed by the call to ffs_sync and any remaining dependency work would mean that this failed. Pointed out by: tegge
* Block secondary writes while expunging active unlinked files.tegge2006-03-113-3/+115
| | | | | | | | | | Fix detection of active unlinked files by checking VI_OWEINACT and VI_DOINGINACT in addition to v_usecount. Defer inactive handling for unlinked files if the file system is mostly suspended (secondary writes being blocked). Perform deferred inactive handling after the file system is resumed.
* Remove unneeded (and broken) usage of MNT_REF()/MNT_REL().tegge2006-03-101-2/+0
|
* Use vn_start_secondary_write() and vn_finished_secondary_write() as ategge2006-03-086-12/+227
| | | | | | | | | | | replacement for vn_write_suspend_wait() to better account for secondary write processing. Close race where secondary writes could be started after ffs_sync() returned but before the file system was marked as suspended. Detect if secondary writes or softdep processing occurred during vnode sync loop in ffs_sync() and retry the loop if needed.
* Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspendedtegge2006-03-081-1/+0
| | | | | | file systems. This could cause deadlocks when creating snapshots. Reviewed by: jeff
* Eliminate a deadlock when creating snapshots. Blocking vn_start_write() musttegge2006-03-021-1/+11
| | | | | | be called without any vnode locks held. Remove calls to vn_start_write() and vn_finished_write() in vnode_pager_putpages() and add these calls before the vnode lock is obtained to most of the callers that don't already have them.
* - Acquire lk in softdep_slowdown so that it's owned when we calljeff2006-03-021-3/+7
| | | | | | softdep_speedup(). - Assert that lk is held in softdep_speedup() rather than acquiring it. This avoids a potential lock recursion.
* - Move softdep from using a global worklist to per-mount worklists. Thisjeff2006-03-026-268/+336
| | | | | | | | | | | | | | | | | | | | | | | has many positive effects including improved smp locking, reducing interdependencies between mounts that can lead to deadlocks, etc. - Add the softdep worklist and various counters to the ufsmnt structure. - Add a mount pointer to the workitem and remove mount pointers from the various structures derived from the workitem as they are now redundant. - Remove the poor-man's semaphore protecting softdep_process_worklist and softdep_flushworklist. Several threads may now process the list simultaneously. - Add softdep_waitidle() to block the thread until all pending dependencies being operated on by other threads have been flushed. - Use softdep_waitidle() in unmount and snapshots to block either operation until the fs is stable. - Remove softdep worklist processing from the syncer and move it into the softdep_flush() thread. This thread processes all softdep mounts once each second and when it is called via the new softdep_speedup() when there is a resource shortage. This removes the softdep hook from the kernel and various hacks in header files to support it. Reviewed by/Discussed with: tegge, truckman, mckusick Tested by: kris
* - Using LK_NOWAIT in qsync() can get us into infinite loop situations thatjeff2006-02-221-1/+1
| | | | | | lead to deadlocks. Remove it. MFC After: 1 week
* In quotaoff(), lock the vnode instead of asserting it when manipulatingrwatson2006-02-121-1/+2
| | | | | | | v_vflags. MFC after: 1 week Submitted by: Antoine Brodin <antoine at brodin at laposte dot net>
* Instead of asserting the vnode lock before manipulating v_vflag, acquirerwatson2006-02-111-1/+2
| | | | | | | it and drop it afterwards. Found by: kris MFC after: 1 week
* - Reorder calls to vrele() after calls to vput() when the vrele is ajeff2006-02-011-1/+1
| | | | | | | | | | | | directory. vrele() may lock the passed vnode, which in these cases would give an invalid lock order of child -> parent. These situations are deadlock prone although do not typically deadlock because the vrele is typically not releasing the last reference to the vnode. Users of vrele must consider it as a call to vn_lock() and order it appropriately. MFC After: 1 week Sponsored by: Isilon Systems, Inc. Tested by: kkenn
* Add marker vnodes to ensure that all vnodes associated with the mount point aretegge2006-01-093-15/+27
| | | | | | iterated over when using MNT_VNODE_FOREACH. Reviewed by: truckman
* If the lock passed to getdirtybuf() is the softdep lock then the backgroundtegge2006-01-091-0/+13
| | | | | | | write completed wakeup could be missed. Close the race by grabbing the lock normally used for protection of bp->b_xflags. Reviewed by: truckman
* Broaden scope of softdep_worklist_busy rwlock protection of softdep processingtegge2006-01-091-1/+19
| | | | | | to avoid some dependencies being missed by softdep_flushworklist(). Reviewed by: truckman
* New option: NO_FFS_SNAPSHOT. I did this in p4 about the same timeimp2006-01-061-0/+58
| | | | | | | that NetBSD implemented it independently of them (don't know which one was actually first). This saves about 24k for those times you don't need snapshot support (like when running off a ram disk, or in an embedded environment where size matters).
* Typo.delphij2005-12-231-1/+1
|
* Eradicate caddr_t from the VFS API.des2005-12-143-15/+15
|
* Fix parsing of atime, clusterr, clusterw, exec, suid, symfollowrodrigc2005-11-241-4/+4
| | | | | | mount options. Noticed by: Amir Shalem < amir at boom dot org dot il>
* If export mount flag is not passed in, set default parametersrodrigc2005-11-201-1/+13
| | | | | | | for export structure and pass that to vfs_export(). Currently in userland mount(8), an export structure is unconditionally passed in, only for UFS. This is an attempt to move that UFS-specific behavior out of mount(8) and into the UFS filesystem code.
* Add more options to ffs_opts, so that vfs_filteropts() will notrodrigc2005-11-191-2/+3
| | | | | complain when we pass these options to a UFS filesystem as strings via nmount(): noexec, nosuid, nosymfollow, sync, suiddir
* - Add parsing for the following existing UFS/FFS mount options in the nmount()rodrigc2005-11-181-1/+33
| | | | | | | | | | callpath via vfs_getopt(), and set the appropriate MNT_* flag: -> acls, async, force, multilabel, noasync, noatime, -> noclusterr, noclusterw, snapshot, update - Allow errmsg as a valid mount option via vfs_getopt(), so we can later add a hook to propagate mount errors back to userspace via vfs_mount_error().
* Slightly reorganize to reduce duplicated code.delphij2005-11-071-2/+1
| | | | Reviewed by: rwatson
* Rate limit filesystem full and out of inodes messages to once aps2005-10-311-6/+21
| | | | second.
* Normalize a significant number of kernel malloc type names:rwatson2005-10-313-3/+3
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Remove an unneeded "a" from comment.delphij2005-10-251-1/+1
|
* Adjust maxfilesize for UFS1 and old 4.4 FFS. For UFS1, increase the limitnjl2005-10-211-2/+2
| | | | | | | | | to (max block - 1) * bsize. For DEV_BSIZE, this doubles the limit from 0.5 TB to 1 TB. For the old 4.4 FFS case, decrease the limit from 0.5 TB to 2 GB - 1. Older systems had a 32 bit off_t so they couldn't access the larger files anyway. Collaboration with: bde
* Correct the type of the temporary variable used by ufs_lookup.c:1.78truckman2005-10-161-1/+1
| | | | | | | to fix the race condition in the ufs_lookup() ISDOTDOT code. Noticed by: bde MFC after: 12 days
* Close a race in the ufs_lookup() code that handles the ISDOTDOTtruckman2005-10-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | case by saving the value of dp->i_ino before unlocking the vnode for the current directory and passing the saved value to VFS_VGET(). Without this change, another thread can overwrite dp->i_ino after the current directory is unlocked, causing ufs_lookup() to lock and return the wrong vnode in place of the vnode for its parent directory. A deadlock can occur if dp->i_ino was changed to a subdirectory of the current directory because the root to leaf vnode lock ordering will be violated. A vnode lock can be leaked if dp->i_ino was changed to point to the current directory, which causes the current vnode lock for the current directory to be recursed, which confuses lookup() into calling vrele() when it should be calling vput(). The probability of this bug being triggered seems to be quite low unless the sysctl variable debug.vfscache is set to 0. Reviewed by: jhb MFC after: 2 weeks
* When performing a VOP_LOOKUP() as part of UFS1 extended attributerwatson2005-10-121-0/+1
| | | | | | | | | | | | | auto-start, set cnp.cn_lkflags to LK_EXCLUSIVE. This flag must now be set so that lockmgr knows what kind of lock to acquire, and it will panic if not specified. This resulted in a panic when using extended attributes on UFS1 as of locking work present in the 6.x branch. This is a RELENG_6_0 merge candidate. Reported by: lofi MFC after: 3 days
* Move execve's access time update functionality into a newdds2005-10-121-3/+3
| | | | | | | | vfs_mark_atime() function, and use the new function for performing efficient atime updates in mmap(). Reviewed by: bde MFC after: 2 weeks
* Avoid unintended VMIO on directories and symlinks due to leftover objecttegge2005-10-101-0/+1
| | | | not having been destroyed.
* Adjust totread argument passed to cluster_read() to account for offset nottegge2005-10-091-1/+1
| | | | being block aligned.
* Don't pretend that a failed sync write was succesful.tegge2005-10-091-3/+1
|
* Reduce probability for a deadlock that can occur when a snapshot inode istegge2005-10-091-0/+11
| | | | | | | | | | | | | | updated by a process holding the snapshot lock. Another process updating a different inode in the same inodeblock will do copy on write checks and lock in the opposite direction. The snapshot code force a copy on write of these blocks manually (cf. start of expunge_ufs[12]) and these inode blocks are later put on snapblklist. This partial fix is to 'drain' the relevant ffs_copyonwrite() operation after installing new snapblklist. This is not a 100% solution since a failed block allocation can cause implicit fsync() which might deadlock before the new snapblklist has been installed.
* Eliminate a deadlock that can occur when a dirty block belonging to a snapshottegge2005-10-091-0/+2
| | | | | | file is flushed by a process not holding snaplk (e.g. bufdaemon). Another process might hold snaplk and try to access the block due to ffs_copyonwrite processing.
* Eliminate a deadlock that can occur during the cgaccount() processing due totegge2005-10-091-3/+2
| | | | | | | | | | | | the cg map buffer being held when writing indirect blocks. The process ends up in ffs_copyonwrite(), attempting to get snaplk while holding the cg map buffer lock. Another process might be in ffs_copyonwrite(), trying to allocate a new block for a copy. It would hold snaplk while trying to get the cg map buffer lock. Release the cg map buffer early and use the copy for most of the cgaccount processing to avoid this deadlock.
* Reduce the probability of low block numbers passed to ffs_snapblkfree() bytegge2005-10-091-55/+35
| | | | | | | | | | | skipping the call from ffs_snapremove() if the block number is zero. Simplify snapshot locking in ffs_copyonwrite() and ffs_snapblkfree() by using the same locking protocol for low block numbers as for larger block numbers. This removes a lock leak that could happen if vn_lock() succeeded after lockmgr() failed in ffs_snapblkfree(). Check if snapshot is gone before retrying a lock in ffs_copyonwrite().
* Reinitialize v_type and v_op fields in case vnode has been reused withouttegge2005-10-091-0/+5
| | | | | | reclamation. If the vnode previously was a fifo then v_op would point to ffs_fifoops[12] instead of the expected ffs_vnodeops[12], causing a panic at the end of ffsext_strategy.
OpenPOWER on IntegriCloud