version 1.13, 1999/10/01 22:26:00 |
version 1.13.2.1, 1999/12/27 18:34:22 |
|
|
* M. Satyanarayanan. |
* M. Satyanarayanan. |
*/ |
*/ |
|
|
/* |
|
* HISTORY |
|
* $Log$ |
|
* Revision 1.13 1999/10/01 22:26:00 soren |
|
* Account for widened v_usecount in struct vnode. |
|
* |
|
* Revision 1.12 1999/09/18 05:31:42 matt |
|
* Make this compile on alpha again. |
|
* |
|
* Revision 1.11 1999/08/03 20:19:18 wrstuden |
|
* Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl |
|
* call with F_FSCTL set and F_SETFL calls generate calls to a new |
|
* fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0 |
|
* for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems |
|
* use genfs_fcntl(). |
|
* |
|
* Reviewed by: thorpej |
|
* Tested by: wrstuden |
|
* |
|
* Revision 1.10 1999/07/08 01:26:23 wrstuden |
|
* Bump osrelease to 1.4E. Add layerfs files, remove null_subr.c. |
|
* |
|
* Update coda to new struct lock in struct vnode. |
|
* |
|
* make fdescfs, kernfs, portalfs, and procfs actually lock their vnodes. |
|
* It's not that hard. |
|
* |
|
* Make unionfs set v_vnlock = NULL so any overlayed fs will call its |
|
* VOP_LOCK. |
|
* |
|
* Revision 1.9 1998/12/10 02:22:52 rvb |
|
* Commit a couple of old fixes |
|
* |
|
* Revision 1.8 1998/11/09 16:36:16 rvb |
|
* Change the way unmounting happens to guarantee that the |
|
* client programs are allowed to finish up (coda_call is |
|
* forced to complete) and release their locks. Thus there |
|
* is a reasonable chance that the vflush implicit in the |
|
* unmount will not get hung on held locks. |
|
* |
|
* Revision 1.7 1998/09/28 17:55:22 rvb |
|
* I want to distinguish from DEBUG printouts and CODA_VERBOSE printouts. |
|
* The latter are normal informational messages that are sometimes |
|
* interesting to view. |
|
* |
|
* Revision 1.6 1998/09/26 15:24:47 tv |
|
* DIAGNOSTIC -> DEBUG for all non-panic messages. DIAGNOSTIC is only for |
|
* sanity checks and should not turn on any messages not already printed |
|
* without it. |
|
* |
|
* Revision 1.5 1998/09/25 15:01:13 rvb |
|
* Conditionalize "stray" printouts under DIAGNOSTIC and DEBUG. |
|
* Make files compile if DEBUG is on (from Alan Barrett). Finally, |
|
* make coda an lkm. |
|
* |
|
* Revision 1.4 1998/09/15 02:03:00 rvb |
|
* Final piece of rename cfs->coda |
|
* |
|
* Revision 1.3 1998/09/12 15:05:49 rvb |
|
* Change cfs/CFS in symbols, strings and constants to coda/CODA |
|
* to avoid fs conflicts. |
|
* |
|
* Revision 1.2 1998/09/08 17:12:48 rvb |
|
* Pass2 complete |
|
* |
|
* Revision 1.1.1.1 1998/08/29 21:26:46 rvb |
|
* Very Preliminary Coda |
|
* |
|
* Revision 1.12 1998/08/28 18:28:00 rvb |
|
* NetBSD -current is stricter! |
|
* |
|
* Revision 1.11 1998/08/28 18:12:23 rvb |
|
* Now it also works on FreeBSD -current. This code will be |
|
* committed to the FreeBSD -current and NetBSD -current |
|
* trees. It will then be tailored to the particular platform |
|
* by flushing conditional code. |
|
* |
|
* Revision 1.10 1998/08/18 17:05:21 rvb |
|
* Don't use __RCSID now |
|
* |
|
* Revision 1.9 1998/08/18 16:31:46 rvb |
|
* Sync the code for NetBSD -current; test on 1.3 later |
|
* |
|
* Revision 1.8 98/02/24 22:22:50 rvb |
|
* Fixes up mainly to flush iopen and friends |
|
* |
|
* Revision 1.7 98/01/31 20:53:15 rvb |
|
* First version that works on FreeBSD 2.2.5 |
|
* |
|
* Revision 1.6 98/01/23 11:53:47 rvb |
|
* Bring RVB_CODA1_1 to HEAD |
|
* |
|
* Revision 1.5.2.8 98/01/23 11:21:11 rvb |
|
* Sync with 2.2.5 |
|
* |
|
* Revision 1.5.2.7 97/12/19 14:26:08 rvb |
|
* session id |
|
* |
|
* Revision 1.5.2.6 97/12/16 22:01:34 rvb |
|
* Oops add cfs_subr.h cfs_venus.h; sync with peter |
|
* |
|
* Revision 1.5.2.5 97/12/16 12:40:14 rvb |
|
* Sync with 1.3 |
|
* |
|
* Revision 1.5.2.4 97/12/10 14:08:31 rvb |
|
* Fix O_ flags; check result in coda_call |
|
* |
|
* Revision 1.5.2.3 97/12/10 11:40:27 rvb |
|
* No more ody |
|
* |
|
* Revision 1.5.2.2 97/12/09 16:07:15 rvb |
|
* Sync with vfs/include/coda.h |
|
* |
|
* Revision 1.5.2.1 97/12/06 17:41:25 rvb |
|
* Sync with peters coda.h |
|
* |
|
* Revision 1.5 97/12/05 10:39:23 rvb |
|
* Read CHANGES |
|
* |
|
* Revision 1.4.14.10 97/11/25 08:08:48 rvb |
|
* cfs_venus ... done; until cred/vattr change |
|
* |
|
* Revision 1.4.14.9 97/11/24 15:44:48 rvb |
|
* Final cfs_venus.c w/o macros, but one locking bug |
|
* |
|
* Revision 1.4.14.8 97/11/21 11:28:04 rvb |
|
* cfs_venus.c is done: first pass |
|
* |
|
* Revision 1.4.14.7 97/11/20 11:46:51 rvb |
|
* Capture current cfs_venus |
|
* |
|
* Revision 1.4.14.6 97/11/18 10:27:19 rvb |
|
* cfs_nbsd.c is DEAD!!!; integrated into cfs_vf/vnops.c |
|
* cfs_nb_foo and cfs_foo are joined |
|
* |
|
* Revision 1.4.14.5 97/11/13 22:03:03 rvb |
|
* pass2 cfs_NetBSD.h mt |
|
* |
|
* Revision 1.4.14.4 97/11/12 12:09:42 rvb |
|
* reorg pass1 |
|
* |
|
* Revision 1.4.14.3 97/11/06 21:03:28 rvb |
|
* don't include headers in headers |
|
* |
|
* Revision 1.4.14.2 97/10/29 16:06:30 rvb |
|
* Kill DYING |
|
* |
|
* Revision 1.4.14.1 1997/10/28 23:10:18 rvb |
|
* >64Meg; venus can be killed! |
|
* |
|
* Revision 1.4 1997/02/20 13:54:50 lily |
|
* check for NULL return from coda_nc_lookup before CTOV |
|
* |
|
* Revision 1.3 1996/12/12 22:11:02 bnoble |
|
* Fixed the "downcall invokes venus operation" deadlock in all known cases. |
|
* There may be more |
|
* |
|
* Revision 1.2 1996/01/02 16:57:07 bnoble |
|
* Added support for Coda MiniCache and raw inode calls (final commit) |
|
* |
|
* Revision 1.1.2.1 1995/12/20 01:57:34 bnoble |
|
* Added CODA-specific files |
|
* |
|
* Revision 3.1.1.1 1995/03/04 19:08:06 bnoble |
|
* Branch for NetBSD port revisions |
|
* |
|
* Revision 3.1 1995/03/04 19:08:04 bnoble |
|
* Bump to major revision 3 to prepare for NetBSD port |
|
* |
|
* Revision 2.6 1995/02/17 16:25:26 dcs |
|
* These versions represent several changes: |
|
* 1. Allow venus to restart even if outstanding references exist. |
|
* 2. Have only one ctlvp per client, as opposed to one per mounted cfs device.d |
|
* 3. Allow ody_expand to return many members, not just one. |
|
* |
|
* Revision 2.5 94/11/09 20:29:27 dcs |
|
* Small bug in remove dealing with hard links and link counts was fixed. |
|
* |
|
* Revision 2.4 94/10/14 09:58:42 dcs |
|
* Made changes 'cause sun4s have braindead compilers |
|
* |
|
* Revision 2.3 94/10/12 16:46:37 dcs |
|
* Cleaned kernel/venus interface by removing XDR junk, plus |
|
* so cleanup to allow this code to be more easily ported. |
|
* |
|
* Revision 2.2 94/09/20 14:12:41 dcs |
|
* Fixed bug in rename when moving a directory. |
|
* |
|
* Revision 2.1 94/07/21 16:25:22 satya |
|
* Conversion to C++ 3.0; start of Coda Release 2.0 |
|
* |
|
* Revision 1.4 93/12/17 01:38:01 luqi |
|
* Changes made for kernel to pass process info to Venus: |
|
* |
|
* (1) in file cfs.h |
|
* add process id and process group id in most of the cfs argument types. |
|
* |
|
* (2) in file cfs_vnodeops.c |
|
* add process info passing in most of the cfs vnode operations. |
|
* |
|
* (3) in file cfs_xdr.c |
|
* expand xdr routines according changes in (1). |
|
* add variable pass_process_info to allow venus for kernel version checking. |
|
* |
|
* Revision 1.3 93/05/28 16:24:33 bnoble |
|
* *** empty log message *** |
|
* |
|
* Revision 1.2 92/10/27 17:58:25 lily |
|
* merge kernel/latest and alpha/src/cfs |
|
* |
|
* Revision 2.4 92/09/30 14:16:37 mja |
|
* Redid buffer allocation so that it does kmem_{alloc,free} for all |
|
* architectures. Zone allocation, previously used on the 386, caused |
|
* panics if it was invoked repeatedly. Stack allocation, previously |
|
* used on all other architectures, tickled some Mach bug that appeared |
|
* with large stack frames. |
|
* [91/02/09 jjk] |
|
* |
|
* Added contributors blurb. |
|
* [90/12/13 jjk] |
|
* |
|
* Revision 2.3 90/07/26 15:50:09 mrt |
|
* Fixed fix to rename to remove .. from moved directories. |
|
* [90/06/28 dcs] |
|
* |
|
* Revision 1.7 90/06/28 16:24:25 dcs |
|
* Fixed bug with moving directories, we weren't flushing .. for the moved directory. |
|
* |
|
* Revision 1.6 90/05/31 17:01:47 dcs |
|
* Prepare for merge with facilities kernel. |
|
* |
|
* |
|
*/ |
|
|
|
#include <sys/param.h> |
#include <sys/param.h> |
#include <sys/systm.h> |
#include <sys/systm.h> |
#include <sys/malloc.h> |
#include <sys/malloc.h> |
|
|
#ifdef hmm |
#ifdef hmm |
vgone(cp->c_ovp); |
vgone(cp->c_ovp); |
#else |
#else |
|
vn_lock(cp->c_ovp, LK_EXCLUSIVE | LK_RETRY); |
VOP_CLOSE(cp->c_ovp, flag, cred, p); /* Do errors matter here? */ |
VOP_CLOSE(cp->c_ovp, flag, cred, p); /* Do errors matter here? */ |
vrele(cp->c_ovp); |
vput(cp->c_ovp); |
#endif |
#endif |
} else { |
} else { |
#ifdef CODA_VERBOSE |
#ifdef CODA_VERBOSE |
|
|
} |
} |
return ENODEV; |
return ENODEV; |
} else { |
} else { |
|
vn_lock(cp->c_ovp, LK_EXCLUSIVE | LK_RETRY); |
VOP_CLOSE(cp->c_ovp, flag, cred, p); /* Do errors matter here? */ |
VOP_CLOSE(cp->c_ovp, flag, cred, p); /* Do errors matter here? */ |
vrele(cp->c_ovp); |
vput(cp->c_ovp); |
} |
} |
|
|
if (--cp->c_ocount == 0) |
if (--cp->c_ocount == 0) |
Line 1104 coda_inactive(v) |
|
Line 872 coda_inactive(v) |
|
|
|
if (IS_UNMOUNTING(cp)) { |
if (IS_UNMOUNTING(cp)) { |
#ifdef DEBUG |
#ifdef DEBUG |
printf("coda_inactive: IS_UNMOUNTING use %d: vp %p, cp %p\n", vp->v_usecount, vp, cp); |
printf("coda_inactive: IS_UNMOUNTING use %ld: vp %p, cp %p\n", vp->v_usecount, vp, cp); |
if (cp->c_ovp != NULL) |
if (cp->c_ovp != NULL) |
printf("coda_inactive: cp->ovp != NULL use %d: vp %p, cp %p\n", |
printf("coda_inactive: cp->ovp != NULL use %ld: vp %p, cp %p\n", |
vp->v_usecount, vp, cp); |
vp->v_usecount, vp, cp); |
#endif |
#endif |
lockmgr(&vp->v_lock, LK_RELEASE, &vp->v_interlock); |
lockmgr(&vp->v_lock, LK_RELEASE, &vp->v_interlock); |