summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs/union_vnops.c
Commit message (Collapse)AuthorAgeFilesLines
* 1. Added cast and parenthesis in block size calculaion inkato1997-05-071-76/+76
| | | | | | | union_statfs(). 2. staticized union vops. Submitted by: Doug Rabson <dfr@nlsystems.com>
* Fixed panic message in union_lock(): union_link --> union_lock.kato1997-05-031-2/+2
|
* Access correct union mount point in union_access. Old vnode is savedkato1997-05-021-2/+4
| | | | | | in savedvp variable and it is used for the argument of MOUNTTOUNIONMOUNT(). I didn't realize ap->a_vp is modified before MOUNTTOUNIONMOUNT(), so the change by revision 1.22 is incorrect.
* Revised fix for locking violation when unionfs calls vput withkato1997-04-291-32/+36
| | | | | | | | | | | | | | | | | UN_KLOCK flag. When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not access uppervp and does not clear UN_KLOCK, and (3) callers of vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes: SETKLOCK(union_node); vput(vnode); CLEARKLOCK(union_node); where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears UN_KLOCK.
* Undo 1.29.kato1997-04-271-2/+2
|
* Do nothing instead of adjusting un_flags when (uppervp is locked) &&kato1997-04-261-11/+3
| | | | | (UN_ULOCK is not set) in union_lock. This condition may indicate race. DIAGNOSTIC kernel still panic here.
* Do not clear UN_ULOCK in certain case.kato1997-04-261-2/+12
| | | | | | | | | Our vput calls vm_object_deallocate() --> vm_object_terminate(). The vm_object_terminate() calls vn_lock(), since UN_LOCKED has been already cleared in union_unlock(). Then, union_lock locks upper vnode when UN_ULOCK is not set. The upper vnode is not unlocked when UN_KLOCK is set in union_unlock(), thus, union_lock tries to lock locked vnode and we get panic.
* Dirty change in union_lock(). Sometimes upper vnode is locked withoutkato1997-04-211-5/+23
| | | | | | | | UN_ULOCK flag. This shows a locking violation but I couldn't find the reason UN_ULOCK is not set or upper vnode is not unlocked. I added the code that detect this case and adjust un_flags. DIAGNOSTIC kernel doesn't adjust un_flags, but just panic here to help debug by kernel hackers.
* Replace VOP_LOCK with vn_lock.kato1997-04-211-2/+2
|
* Undo previous commit to avoid panic, and fix order of argument ofkato1997-04-161-15/+2
| | | | | | | | | | | | | | | VOP_LINK(). The reason of strange behavior was wrong order of the argument, that is, the operation # ln foo bar in a union fs tried to do # ln bar foo in ufs layer. Now we can make a link in a union fs.
* Quick-hack to avoid `lock against myself' panic. It is not the realkato1997-04-151-2/+15
| | | | | | | | | | | | | | | | | | | | | | fix! The ufs_link() assumes that vnode is not unlocked and tries to lock it in certain case. Because union_link calls VOP_LINK after locking vnode, vn_lock in ufs_link causes above panic. Currently, I don't know the real fix for a locking violation in union_link, but I think it is important to avoid panic. A vnode is unlocked before calling VOP_LINK and is locked after it if the vnode is not union fs. Even though panic went away, the process that access the union fs in which link was made will hang-up. Hang-up can be easily reproduced by following operation: mount -t union a b cd b ln foo bar ls
* Fix locking violation when accessing `..'.kato1997-04-141-1/+39
| | | | Obtained from: NetBSD
* Access correct union mount point in union_access.kato1997-04-131-2/+2
|
* The function union_fsync tries to lock overlaying vnode object whenphk1997-04-131-3/+14
| | | | | | | | | | dolock is not set (that is, targetvp == overlaying vnode object). Current code use FIXUP macro to do this, and never unlocks overlaying vnode object in union_fsync. So, the vnode object will be locked twice and never unlocked. PR: 3271 Submitted by: kato
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-231-2/+2
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Restored #include of <sys/kernel.h> so that this compiles again.bde1997-02-121-0/+1
|
* Add function protypes for the new Lite2 unionfs functions.mpp1997-02-121-0/+3
|
* This is the kernel Lite/2 commit. There are some requisite userlanddyson1997-02-101-322/+476
| | | | | | | | | | | | | | | changes, so don't expect to be able to run the kernel as-is (very well) without the appropriate Lite/2 userland changes. The system boots and can mount UFS filesystems. Untested: ext2fs, msdosfs, NFS Known problems: Incorrect Berkeley ID strings in some files. Mount_std mounts will not work until the getfsent library routine is changed. Reviewed by: various people Submitted by: Jeffery Hsu <hsu@freebsd.org>
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Added prototypes.bde1995-12-031-1/+40
| | | | Removed some unnecessary #includes.
* Introduced a type `vop_t' for vnode operation functions and usedbde1995-11-091-44/+44
| | | | | | | | | | | | | | | it 1138 times (:-() in casts and a few more times in declarations. This change is null for the i386. The type has to be `typedef int vop_t(void *)' and not `typedef int vop_t()' because `gcc -Wstrict-prototypes' warns about the latter. Since vnode op functions are called with args of different (struct pointer) types, neither of these function types is any use for type checking of the arg, so it would be preferable not to use the complete function type, especially since using the complete type requires adding 1138 casts to avoid compiler warnings and another 40+ casts to reverse the function pointer conversions before calling the functions.
* Added VOP_GETPAGES/VOP_PUTPAGES and also the "backwards" block countdyson1995-09-041-2/+3
| | | | for VOP_BMAP. Updated affected filesystems...
* The `cred' and `proc' args were missing for some VOP_OPEN() and VOP_CLOSE()bde1995-08-171-3/+3
| | | | | | | | calls. Found by: gcc -Wstrict-prototypes after I supplied some of the 5000+ missing prototypes. Now I have 9000+ lines of warnings and errors about bogus conversions of function pointers.
* Removed my special-case hack for VOP_LINK and fixed the problem with thedg1995-08-011-3/+3
| | | | | | | wrong vp's ops vector being used by changing the VOP_LINK's argument order. The special-case hack doesn't go far enough and breaks the generic bypass routine used in some non-leaf filesystems. Pointed out by Kirk McKusick.
* Fixed VOP_LINK argument order botch.dg1995-06-281-2/+2
|
* From tim@cs.city.ac.uk (Tim Wilkinson):dg1994-11-041-4/+8
| | | | | | | | | | | | | Find enclosed a short bugfix to get the union filesystem up and running in FreeBSD-current. We don't think we've got all the problems yet but these fixes sort out the major ones (which mostly concert bad locking of vnodes), no doubt we'll post others as necessary. Known problems include the inability of the umount command (not the system call) to unmount unions in certain circumstances (this is due the way "realpath" works), and the failure of direntries to always get all available files in unioned subdirectories. We are, as they say, working on it. Submitted by: tim@cs.city.ac.uk (Tim Wilkinson)
* Cosmetics. reduce the noise from gcc -Wall.phk1994-10-101-7/+8
|
* Use tsleep() rather than sleep so that 'ps' is more informative aboutdg1994-10-061-4/+4
| | | | the wait.
* Fix a few niggling little bugs:wollman1994-09-211-1/+2
| | | | | | | - set args->lkm_offset correctly so that VFS modules can be unloaded - initialize _fs_vfsops.vfc_refcount correctly so that VFS modules can be unloaded - include kernel.h in a few placves to get the correct definition of DATA_SET
* Implemented loadable VFS modules, and made most existing filesystemswollman1994-09-211-1/+3
| | | | loadable. (NFS is a notable exception.)
* Added $Id$dg1994-08-021-0/+1
|
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.rgrimes1994-05-251-1/+1
| | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+1495
OpenPOWER on IntegriCloud