summaryrefslogtreecommitdiffstats
path: root/sys/coda/coda_subr.c
Commit message (Collapse)AuthorAgeFilesLines
* Complete repo-copy and move of Coda from src/sys/coda to src/sys/fs/codarwatson2007-07-121-573/+0
| | | | | | | | | | by removing files from src/sys/coda, and updating include paths in the new location, kernel configuration, and Makefiles. In one case add $FreeBSD$. Discussed with: anderson, Jan Harkes <jaharkes@cs.cmu.edu> Approved by: re (kensmith) Repo-copy madness: simon
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-131-1/+1
| | | | | | the filesystem. Check that rather than VI_XLOCK. Sponsored by: Isilon Systems, Inc.
* Start each of the license/copyright comments with /*-imp2005-01-051-2/+2
|
* When we traverse the vnodes on a mountpoint we need to look out forphk2004-07-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | our cached 'next vnode' being removed from this mountpoint. If we find that it was recycled, we restart our traversal from the start of the list. Code to do that is in all local disk filesystems (and a few other places) and looks roughly like this: MNT_ILOCK(mp); loop: for (vp = TAILQ_FIRST(&mp...); (vp = nvp) != NULL; nvp = TAILQ_NEXT(vp,...)) { if (vp->v_mount != mp) goto loop; MNT_IUNLOCK(mp); ... MNT_ILOCK(mp); } MNT_IUNLOCK(mp); The code which takes vnodes off a mountpoint looks like this: MNT_ILOCK(vp->v_mount); ... TAILQ_REMOVE(&vp->v_mount->mnt_nvnodelist, vp, v_nmntvnodes); ... MNT_IUNLOCK(vp->v_mount); ... vp->v_mount = something; (Take a moment and try to spot the locking error before you read on.) On a SMP system, one CPU could have removed nvp from our mountlist but not yet gotten to assign a new value to vp->v_mount while another CPU simultaneously get to the top of the traversal loop where it finds that (vp->v_mount != mp) is not true despite the fact that the vnode has indeed been removed from our mountpoint. Fix: Introduce the macro MNT_VNODE_FOREACH() to traverse the list of vnodes on a mountpoint while taking into account that vnodes may be removed from the list as we go. This saves approx 65 lines of duplicated code. Split the insmntque() which potentially moves a vnode from one mount point to another into delmntque() and insmntque() which does just what the names say. Fix delmntque() to set vp->v_mount to NULL while holding the mountpoint lock.
* Remove mntvnode_mtx and replace it with per-mountpoint mutex.kan2003-11-051-3/+3
| | | | | | | | | | Introduce two new macros MNT_ILOCK(mp)/MNT_IUNLOCK(mp) to operate on this mutex transparently. Eventually new mutex will be protecting more fields in struct mount, not only vnode list. Discussed with: jeff
* Include <sys/mutex.h>. Don't depend on namespace pollution in <sys/vnode.h>.bde2003-10-051-2/+1
| | | | | Fixed a nearby style bug. The include of vcoda.h used angle brackets and was not used.
* - Check XLOCK prior to accessing v_data.jeff2003-10-051-0/+6
|
* - Make proper use of the mntvnode_mtx. We do not need the loop labeljeff2003-10-041-3/+5
| | | | | because we do not drop the mntvnode_mtx. If this code had ever executed and hit the loop condition it would have spun forever.
* Add support for the Coda 6.x venus<->kernel interface. This extendstjr2003-09-071-45/+44
| | | | | | | | | | | | | | FIDs to be 128-bits wide and adds support for realms. Add a new CODA_COMPAT_5 option, which requests support for the old Coda 5.x interface instead of the new one. Create a new coda5.ko module that supports the 5.x interface, and make the existing coda.ko module use the new 6.x interface. These modules cannot both be loaded at the same time. Obtained from: Jan Harkes & the coda-6.0.2 distribution, NetBSD (drochner) (CODA_COMPAT_5 option).
* Use __FBSDID().obrien2003-06-101-5/+4
|
* - Use vrefcnt() instead of directly accessing v_usecount.jeff2002-09-251-8/+8
|
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-041-2/+4
| | | | | | | | | | | | | | | - v_vflag is protected by the vnode lock and is used when synchronization with VOP calls is needed. - v_iflag is protected by interlock and is used for dealing with vnode management issues. These flags include X/O LOCK, FREE, DOOMED, etc. - All accesses to v_iflag and v_vflag have either been locked or marked with mp_fixme's. - Many ASSERT_VOP_LOCKED calls have been added where the locking was not clear. - Many functions in vfs_subr.c were restructured to provide for stronger locking. Idea stolen from: BSD/OS
* More s/file system/filesystem/gtrhodes2002-05-161-1/+1
|
* Don't put a line break in string literals. GCC 3.1 complains and GCCmarcel2002-04-201-13/+10
| | | | 3.2 drops the ball.
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-2/+2
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* Backed out vestiges of the quick fixes for the transient breakage ofbde2001-10-131-1/+0
| | | | | <sys/mount.h> in rev.1.106 of the latter (don't include <sys/socket.h> just to work around bugs in <sys/mount.h>).
* Undo part of the tangle of having sys/lock.h and sys/mutex.h included inmarkm2001-05-011-2/+2
| | | | | | | | | | | other "system" header files. Also help the deprecation of lockmgr.h by making it a sub-include of sys/lock.h and removing sys/lockmgr.h form kernel .c files. Sort sys/*.h includes where possible in affected files. OK'ed by: bde (with reservations)
* fix it so it compiles againmjacob2001-04-231-0/+2
|
* Mechanical change to use <sys/queue.h> macro API instead ofphk2001-02-041-2/+2
| | | | | | | fondling implementation details. Created with: sed(1) Reviewed by: md5(1)
* Delete unused #include <sys/select.h>.wollman2001-01-091-1/+0
|
* Remove unneeded #include <sys/proc.h> lines.phk2000-10-291-1/+0
|
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Remove the RCS "Log" and all the verbiage it has generated.phk1999-07-211-177/+3
|
* Clean up the KLD/LKM goop a bit.peter1999-01-171-5/+7
|
* Venus must be passed O_CREAT flag on VOP_OPEN iff this isrvb1998-10-281-17/+6
| | | | | | a creat so that we can will allow a mode 444 file to be written into. Sync with the latest coda.h and deal with collateral damage.
* Fixes for lkm:rvb1998-09-291-2/+7
| | | | | 1. use VFS_LKM vs ACTUALLY_LKM_NOT_KERNEL 2. don't pass -DCODA to lkm build
* Put "stray" printouts under DIAGNOSTIC. Make everything buildrvb1998-09-251-3/+11
| | | | | with DEBUG on. Add support for lkm. (The macro's don't work for me; for a good chuckle look at the end of coda_fbsd.c.)
* Finish conversion of cfs -> codarvb1998-09-131-7/+11
|
* All the references to cfs, in symbols, structs, and stringsrvb1998-09-111-134/+133
| | | | have been changed to coda. (Same for CFS.)
* Clean LINTrvb1998-09-061-3/+7
|
* Pass2 completervb1998-09-021-50/+36
|
* Very Preliminary Codarvb1998-08-291-0/+750
OpenPOWER on IntegriCloud