summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not allow operations which cause known file-system corruption.green2004-01-161-2/+8
|
* Remove a warning.green2004-01-161-2/+0
|
* Fix an upper-vnode leak created in revision 1.52. When an upper-layergreen2004-01-162-19/+13
| | | | | | | | | | | | file has been removed, it should be purged from the cache, but it need not be removed from the directory stack causing corruption; instead, it will simply be removed once the last references and holds on it are dropped at the end of the unlink/rmdir system calls, and the normal !UN_CACHED VOP_INACTIVE() handler for unionfs finishes it off. This is easily reproduced by repeated "echo >file; rm file" on a unionfs mount. Strangely, "echo -n >file; rm file" didn't make it happen.
* Pass ACL, extended attribute and MAC vnode ops down the vnode stack.tjr2004-01-031-0/+239
|
* - A sanity check in unionfs verifies that lookups of '.' return thedas2003-11-141-27/+21
| | | | | | | | | | | | | vnode of the parent. However, this check should not be performed if the lookup failed. This change should fix "union_lookup returning . not same as startdir" panics people were seeing. The bug was introduced by an incomplete import of a NetBSD delta in rev 1.38. - Move the aforementioned check out from DIAGNOSTIC. Performance is the least of our unionfs worries. - Minor reorganization. PR: 53004 MFC after: 1 week
* Remove now unused variable.kan2003-11-011-1/+0
|
* Do not bother walking mount point vnode list just to calculatekan2003-11-011-5/+1
| | | | | the number of vnodes. Use precomputed mp->mnt_nvnodelistsize value instead.
* Add a "int fd" argument to VOP_OPEN() which in the future willphk2003-07-262-5/+5
| | | | | | | | | contain the filedescriptor number on opens from userland. The index is used rather than a "struct file *" since it conveys a bit more information, which may be useful to in particular fdescfs and /dev/fd/* For now pass -1 all over the place.
* Add a f_vnode field to struct file.phk2003-06-221-0/+1
| | | | | | | | | | | | Several of the subtypes have an associated vnode which is used for stuff like the f*() functions. By giving the vnode a speparate field, a number of checks for the specific subtype can be replaced simply with a check for f_vnode != NULL, and we can later free f_data up to subtype specific use. At this point in time, f_data still points to the vnode, so any code I might have overlooked will still work.
* Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementationsphk2003-06-151-0/+2
| | | | to check that the buffer points to the correct vnode.
* Fix some style problems, some of which are old, some new, and somedas2003-06-151-8/+10
| | | | | | inherited from UFS. Requested by: bde, njl
* If someone tries to mount a union filesystem with another unionfs asdas2003-06-141-4/+14
| | | | | | the upper layer, fail gracefully instead of panicing. MFC after: 3 days
* Introduce malloc types M_UNDCACHE and M_UNPATH for importantdas2003-06-141-10/+13
| | | | | | | unionfs-related data structures to aid in debugging memory leaks. Use NULL and NULLVP instead of 0 as appropriate. MFC after: 3 days
* Factor out the process of freeing ``directory caches'', which unionfsdas2003-06-143-24/+25
| | | | | | | | directory vnodes use to refer to their constituent vnodes, into union_dircache_free(). Also s/union_dircache/union_dircache_get/ and tweak the structure of union_dircache_r(). MFC after: 3 days
* Plug a serious memory leak. The -STABLE equivalent of this patch hasdas2003-06-131-8/+20
| | | | | | | | | | | been tested extensively, but -CURRENT testing has been hampered by a number of panics that also occur without the patch. Since the destabilizing changes between 4.X and 5.X are external to unionfs, I believe this patch applies equally well to both. Thanks to scrappy for assistance testing these and other changes. MFC after: 4 days
* Initialize struct vfsops C99-sparsely.phk2003-06-121-23/+10
| | | | | Submitted by: hmp Reviewed by: phk
* Rename vfs_stdsync function to vfs_stdnosync which matches morekan2003-03-111-1/+1
| | | | | | | | | | | | | closely what function is really doing. Update all existing consumers to use the new name. Introduce a new vfs_stdsync function, which iterates over mount point's vnodes and call FSYNC on each one of them in turn. Make nwfs and smbfs use this new function instead of rolling their own identical sync implementations. Reviewed by: jeff
* Finish cleanup of vprint() which was begun with changing v_tag to a string.njl2003-03-031-1/+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.
* More low-hanging fruit: kill caddr_t in calls to wakeup(9) / [mt]sleep(9).des2003-03-021-2/+2
|
* Back out M_* changes, per decision of the TRB.imp2003-02-192-8/+8
| | | | Approved by: trb
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-212-8/+8
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* Fake up a struct componentname to pass to VOP_WHITEOUT instead of passingtjr2003-01-181-1/+10
| | | | | | NULL. union_whiteout() expects the componentname argument to be non-NULL. Fixes a NULL dereference panic when an existing union mount becomes the upper layer of a new union mount.
* Bow to the whining masses and change a union back into void *. Retaindillon2003-01-131-1/+1
| | | | | removal of unnecessary casts and throw in some minor cleanups to see if anyone complains, just for the hell of it.
* Change struct file f_data to un_data, a union of the correct structdillon2003-01-121-1/+1
| | | | | | | | | | pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
* Since Jeffr made the std* functions the default in rev 1.63 ofphk2003-01-041-1/+0
| | | | | | | kern/vfs_defaults.c it is wrong for the individual filesystems to use the std* functions as that prevents override of the default. Found by: src/tools/tools/vop_table
* Fix comments and one resulting code confusion about the type of thephk2002-10-161-1/+1
| | | | | | "command" argument to VOP_IOCTL. Spotted by: FlexeLint.
* Regularize the vop_stdlock'ing protocol across all the filesystemsmckusick2002-10-143-91/+0
| | | | | | | | | | | | | | | | | | | | 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.
* Fix a warning on 64 bits platforms: copystr() takes a size_t *,mux2002-10-061-1/+1
| | | | not an int *.
* - Use vrefcnt() where it is safe to do so instead of doing direct andjeff2002-09-252-20/+20
| | | | | | | 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.
* Fix misspellings, capitalization, and punctuation in comments. Minortruckman2002-09-223-90/+95
| | | | comment phrasing and style changes.
* VOP_FSYNC() requires that it's vnode argument be locked, which nfs_link()truckman2002-09-191-8/+15
| | | | | | | | | | wasn't doing. Rather than just lock and unlock the vnode around the call to VOP_FSYNC(), implement rwatson's suggestion to lock the file vnode in kern_link() before calling VOP_LINK(), since the other filesystems also locked the file vnode right away in their link methods. Remove the locking and and unlocking from the leaf filesystem link methods. Reviewed by: rwatson, bde (except for the unionfs_link() changes)
* Remove all use of vnode->v_tag, replacing with appropriate substitutes.njl2002-09-142-4/+5
| | | | | | | | | | | | 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-6/+7
| | | | | | | | | | | | | | | - 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
* nmount'ify unionfs further by using separate options insteadmux2002-06-152-6/+16
| | | | | | | of passing a flags mount options. This removes the include of sys/fs/unionfs/union.h in mount_unionfs as it should be. Reviewed by: phk
* Convert unionfs to nmount.mux2002-05-242-25/+22
|
* Fix comments.mux2002-05-241-1/+1
|
* Change the vm_zone calls over to uma calls. Remove the reference to thejeff2002-04-081-9/+9
| | | | vm_zone header.
* Remove __P.alfred2002-03-194-83/+83
|
* Simple p_ucred -> td_ucred changes to start using the per-thread ucredjhb2002-02-272-4/+4
| | | | reference.
* Don't even think about using v_id for magic tricks, v_id is givingphk2002-02-171-5/+0
| | | | us enough trouble as it is for SMPng.
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-132-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* Fix a BUF_TIMELOCK race against BUF_LOCK and fix a deadlock in vget()dillon2001-12-201-1/+1
| | | | | | | | against VM_WAIT in the pageout code. Both fixes involve adjusting the lockmgr's timeout capability so locks obtained with timeouts do not interfere with locks obtained without a timeout. Hopefully MFC: before the 4.5 release
* Change the vnode list under the mount point from a LIST to a TAILQdillon2001-10-231-1/+1
| | | | | | in preparation for an implementation of limiting code for kern.maxvnodes. MFC after: 3 days
* Change the kernel's ucred API as follows:jhb2001-10-111-2/+1
| | | | | | | | - crhold() returns a reference to the ucred whose refcount it bumps. - crcopy() now simply copies the credentials from one credential to another and has no return value. - a new crshared() primitive is added which returns true if a ucred's refcount is > 1 and false (0) otherwise.
* KSE Milestone 2julian2001-09-124-216/+216
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Protect the mnt_vnode list with the mntvnode lock.jhb2001-06-281-0/+4
|
* Actually rename FDESC, PORTAL, UMAP and UNION file systems.ru2001-05-241-1/+1
| | | | OK'ed by: bp
* - FDESC, FIFO, NULL, PORTAL, PROC, UMAP and UNION fileru2001-05-233-3/+3
| | | | | | | | | | | | | | | systems were repo-copied from sys/miscfs to sys/fs. - Renamed the following file systems and their modules: fdesc -> fdescfs, portal -> portalfs, union -> unionfs. - Renamed corresponding kernel options: FDESC -> FDESCFS, PORTAL -> PORTALFS, UNION -> UNIONFS. - Install header files for the above file systems. - Removed bogus -I${.CURDIR}/../../sys CFLAGS from userland Makefiles.
* Sort includes from previous commit.jhb2001-05-211-1/+1
|
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-191-0/+1
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
OpenPOWER on IntegriCloud