summaryrefslogtreecommitdiffstats
path: root/sys/fs/nullfs
Commit message (Collapse)AuthorAgeFilesLines
...
* - We have to transfer lockers after reseting our vnlock pointer.jeff2005-03-151-0/+5
| | | | Sponsored by: Isilon Systems, Inc.
* - The VI_DOOMED flag now signals the end of a vnode's relationship withjeff2005-03-132-12/+8
| | | | | | | | the filesystem. Check that rather than VI_XLOCK. - VOP_INACTIVE should no longer drop the vnode lock. - The vnode lock is required around calls to vrecycle() and vgone(). Sponsored by: Isilon Systems, Inc.
* Introduce vx_wait{l}() and use it instead of home-rolled versions.phk2005-02-171-4/+2
|
* Remove vop_destroyvobject()phk2005-02-071-27/+1
|
* Make filesystems get rid of their own vnodes vnode_pager object inphk2005-01-281-0/+1
| | | | VOP_RECLAIM().
* Remove unused argument to vrecycle()phk2005-01-281-1/+1
|
* Take VOP_GETVOBJECT() out to pasture. We use the direct pointer now.phk2005-01-251-11/+0
|
* Don't implement vop_createvobject(), vop_open() and vop_close() managesphk2005-01-241-19/+0
| | | | this for nullfs now.
* Add null_open() and null_close() which calls null_bypass() and managedphk2005-01-241-0/+29
| | | | the v_object pointer.
* Kill the VV_OBJBUF and test the v_object for NULL instead.phk2005-01-241-2/+1
|
* Remove "register" keywords.phk2005-01-241-2/+2
|
* Style: Remove the commented out vop_foo_args replicas.phk2005-01-241-103/+15
|
* Change the generated VOP_ macro implementations to improve type checkingphk2005-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code.
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-111-2/+1
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* whitespacephk2005-01-101-1/+1
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-064-4/+4
|
* Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS().phk2004-12-061-5/+2
|
* VFS_STATFS(mp, ...) is mostly called with &mp->mnt_stat, but a few casesphk2004-12-051-5/+0
| | | | | | | | doesn't. Most of the implementations have grown weeds for this so they copy some fields from mnt_stat if the passed argument isn't that. Fix this the cleaner way: Always call the implementation on mnt_stat and copy that in toto to the VFS_STATFS argument if different.
* Back when VOP_* was introduced, we did not have new-style structphk2004-12-014-30/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initializations but we did have lofty goals and big ideals. Adjust to more contemporary circumstances and gain type checking. Replace the entire vop_t frobbing thing with properly typed structures. The only casualty is that we can not add a new VOP_ method with a loadable module. History has not given us reason to belive this would ever be feasible in the the first place. Eliminate in toto VOCALL(), vop_t, VNODEOP_SET() etc. Give coda correct prototypes and function definitions for all vop_()s. Generate a bit more data from the vnode_if.src file: a struct vop_vector and protype typedefs for all vop methods. Add a new vop_bypass() and make vop_default be a pointer to another struct vop_vector. Remove a lot of vfs_init since vop_vector is ready to use from the compiler. Cast various vop_mumble() to void * with uppercase name, for instance VOP_PANIC, VOP_NULL etc. Implement VCALL() by making vdesc_offset the offsetof() the relevant function pointer in vop_vector. This is disgusting but since the code is generated by a script comparatively safe. The alternative for nullfs etc. would be much worse. Fix up all vnode method vectors to remove casts so they become typesafe. (The bulk of this is generated by scripts)
* Mechanically change prototypes for vnode operations to use the new typedefs.phk2004-12-011-14/+14
|
* Eliminate null_open() and use instead null_bypass().phk2004-11-261-24/+0
| | | | | | | | Null_open() was only here to handle MNT_NODEV, but since that does not affect any filesystems anymore, it could only have any effect if you nullfs mounted a devfs but didn't want devices to show up. If you need that, there are easier ways.
* Use system wide no-op vfs_start function.phk2004-11-251-17/+0
|
* Refuse attempts to mount root filesystemphk2004-11-091-0/+2
|
* Put a version element in the VFS filesystem configuration structurephk2004-07-301-6/+4
| | | | | | | | | | | | | | | | | | and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
* Make VFS_ROOT() and vflush() take a thread argument.alfred2004-07-121-3/+3
| | | | | | This is to allow filesystems to decide based on the passed thread which vnode to return. Several filesystems used curthread, they now use the passed thread.
* Update for the KDB framework:marcel2004-07-102-3/+3
| | | | | o Call kdb_enter() instead of Debugger(). o Make debugging code conditional upon KDB instead of DDB.
* Remove advertising clause from University of California Regent'simp2004-04-074-16/+0
| | | | | | | license, per letter dated July 22, 1999 and email from Peter Wemm, Alan Cox and Robert Watson. Approved by: core, peter, alc, rwatson
* Don't try to unlock the directory vnode in null_lookup() if the lock istruckman2004-01-111-1/+1
| | | | | shared with the underlying file system and the lookup in the underlying file system did the unlock for us.
* v_vxproc was a bogus name for a thread (pointer).bde2003-12-281-2/+2
|
* MFp4: Fix two bugs causing possible deadlocks or panics, and one nit:tjr2003-06-173-13/+95
| | | | | | | | | | | | | | | | | | - Emulate lock draining (LK_DRAIN) in null_lock() to avoid deadlocks when the vnode is being recycled. - Don't allow null_nodeget() to return a nullfs vnode from the wrong mount when multiple nullfs's are mounted. It's unclear why these checks were removed in null_subr.c 1.35, but they are definitely necessary. Without the checks, trying to unmount a nullfs mount will erroneously return EBUSY, and forcibly unmounting with -f will cause a panic. - Bump LOG2_SIZEVNODE up to 8, since vnodes are >256 bytes now. The old value (7) didn't cause any problems, but made the hash algorithm suboptimal. These changes fix nullfs enough that a parallel buildworld succeeds. Submitted by: tegge (partially; LK_DRAIN) Tested by: kris
* Initialize struct vfsops C99-sparsely.phk2003-06-121-37/+26
| | | | | Submitted by: hmp Reviewed by: phk
* Use temporary variable to avoid double expansion of macro with side effects.phk2003-05-311-1/+4
| | | | Found by: FlexeLint
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-2/+1
| | | | | | Remove extraneous uses of vop_null, instead defering to the default op. Rename vnode type "vfs" to the more descriptive "syncer". Fix formatting for various filesystems that use vop_print.
* Back out M_* changes, per decision of the TRB.imp2003-02-192-2/+2
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-212-2/+2
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/schweikh2002-12-301-1/+1
| | | | Add FreeBSD Id tag where missing.
* Be consistent about functions being static.phk2002-10-161-1/+1
| | | | Spotted by: FlexeLint
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-142-3/+1
| | | | | | | | | | | | | | | | | | | | that use it. Specifically, vop_stdlock uses the lock pointed to by vp->v_vnlock. By default, getnewvnode sets up vp->v_vnlock to reference vp->v_lock. Filesystems that wish to use the default do not need to allocate a lock at the front of their node structure (as some still did) or do a lockinit. They can simply start using vn_lock/VOP_UNLOCK. Filesystems that wish to manage their own locks, but still use the vop_stdlock functions (such as nullfs) can simply replace vp->v_vnlock with a pointer to the lock that they wish to have used for the vnode. Such filesystems are responsible for setting the vp->v_vnlock back to the default in their vop_reclaim routine (e.g., vp->v_vnlock = &vp->v_lock). In theory, this set of changes cleans up the existing filesystem lock interface and should have no function change to the existing locking scheme. Sponsored by: DARPA & NAI Labs.
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-251-3/+3
| | | | | | | unlocked accesses to v_usecount. - Lock access to the buf lists in the various sync routines. interlock locking could be avoided almost entirely in leaf filesystems if the fsync function had a generic helper.
* - Hold the vp lock while accessing v_vflags.jeff2002-09-251-5/+7
|
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-142-2/+3
| | | | | | | | | | | | v_tag is now const char * and should only be used for debugging. Additionally: 1. All users of VT_NTS now check vfsconf->vf_type VFCF_NETWORK 2. The user of VT_PROCFS now checks for the new flag VV_PROCDEP, which is propagated by pseudofs to all child vnodes if the fs sets PFS_PROCDEP. Suggested by: phk Reviewed by: bde, rwatson (earlier version)
* - Replace v_flag with v_iflag and v_vflagjeff2002-08-042-3/+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
* Fix a race during null node creation between relookuping the hash andsemenu2002-06-134-105/+102
| | | | | | | | | | | | | adding vnode to hash. The fix is to use atomic hash-lookup-and-add-if- not-found operation. The odd thing is that this race can't happen actually because the lowervp vnode is locked exclusively now during the whole process of null node creation. This must be thought as a step toward shared lookups. Also remove vp->v_mount checks when looking for a match in the hash, as this is the vestige. Also add comments and cosmetic changes.
* Change null_hashlock into null_hashmtx, because there is no need forsemenu2002-06-131-22/+15
| | | | | | | lockmgr and this helps to vget() vnode from hash without a race. Reviewed by: bp MFC after: 2 weeks
* Fix the "error" path (when dropping not fully initialized vnode).semenu2002-06-133-19/+26
| | | | | | | | Also move hash operations out of null_vnops.c and explicitly initialize v_lock in null_node_alloc (to set wmesg). Reviewed by: bp MFC after: 2 weeks
* Fix wrong locking in null_inactive and null_reclaim. This makes nullfssemenu2002-06-131-10/+7
| | | | | | relatively working back. Reviewed by: mckusick, bp
* Convert nullfs to nmount.mux2002-05-232-17/+12
|
* Fix null_lock() not unlocking vp->v_interlock if LK_THISLAYER.semenu2002-05-211-2/+6
| | | | | Reviewed by: bp@FreeBSD.org MFC after: 1 week
* More s/file system/filesystem/gtrhodes2002-05-161-7/+7
|
* Cannot release vnode underlying the nullfs vnode in null_inactivemckusick2002-03-181-19/+26
| | | | | | | | | | as it leaves the nullfs vnode allocated, but with no identity. The effect is that a null mount can slowly accumulate all the vnodes in the system, reclaiming them only when it is unmounted. Thus the null_inactive state instead accelerates the release of the null vnode by calling vrecycle which will in turn call the null_reclaim operator. The null_reclaim routine then does the freeing actions previosuly (incorrectly) done in null_inactive.
OpenPOWER on IntegriCloud