diff options
author | rvb <rvb@FreeBSD.org> | 1998-09-02 19:09:53 +0000 |
---|---|---|
committer | rvb <rvb@FreeBSD.org> | 1998-09-02 19:09:53 +0000 |
commit | 9d7a126e4f15a3d681547001d968295127762bcb (patch) | |
tree | 40c02767fe13f3b472c41ff7cd797bd4ae0e3d79 /sys/fs/coda/coda_subr.c | |
parent | 2c94888c3d229de9d1faba02308b9d03be1fd50f (diff) | |
download | FreeBSD-src-9d7a126e4f15a3d681547001d968295127762bcb.zip FreeBSD-src-9d7a126e4f15a3d681547001d968295127762bcb.tar.gz |
Pass2 complete
Diffstat (limited to 'sys/fs/coda/coda_subr.c')
-rw-r--r-- | sys/fs/coda/coda_subr.c | 86 |
1 files changed, 36 insertions, 50 deletions
diff --git a/sys/fs/coda/coda_subr.c b/sys/fs/coda/coda_subr.c index 3d20e57..a2fd792 100644 --- a/sys/fs/coda/coda_subr.c +++ b/sys/fs/coda/coda_subr.c @@ -1,33 +1,35 @@ /* - - Coda: an Experimental Distributed File System - Release 3.1 - - Copyright (c) 1987-1998 Carnegie Mellon University - All Rights Reserved - -Permission to use, copy, modify and distribute this software and its -documentation is hereby granted, provided that both the copyright -notice and this permission notice appear in all copies of the -software, derivative works or modified versions, and any portions -thereof, and that both notices appear in supporting documentation, and -that credit is given to Carnegie Mellon University in all documents -and publicity pertaining to direct or indirect use of this code or its -derivatives. - -CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS, -SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS -FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON -DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER -RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF -ANY DERIVATIVE WORK. - -Carnegie Mellon encourages users of this software to return any -improvements or extensions that they make, and to grant Carnegie -Mellon the rights to redistribute these changes without encumbrance. -*/ - -/* $Header: /afs/cs/project/coda-src/cvs/coda/kernel-src/vfs/freebsd/cfs/cfs_subr.c,v 1.11 1998/08/28 18:12:18 rvb Exp $ */ + * + * Coda: an Experimental Distributed File System + * Release 3.1 + * + * Copyright (c) 1987-1998 Carnegie Mellon University + * All Rights Reserved + * + * Permission to use, copy, modify and distribute this software and its + * documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation, and + * that credit is given to Carnegie Mellon University in all documents + * and publicity pertaining to direct or indirect use of this code or its + * derivatives. + * + * CODA IS AN EXPERIMENTAL SOFTWARE SYSTEM AND IS KNOWN TO HAVE BUGS, + * SOME OF WHICH MAY HAVE SERIOUS CONSEQUENCES. CARNEGIE MELLON ALLOWS + * FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION. CARNEGIE MELLON + * DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER + * RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE OR OF + * ANY DERIVATIVE WORK. + * + * Carnegie Mellon encourages users of this software to return any + * improvements or extensions that they make, and to grant Carnegie + * Mellon the rights to redistribute these changes without encumbrance. + * + * @(#) src/sys/cfs/cfs_subr.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ + * $Id: $ + * + */ /* * Mach Operating System @@ -44,6 +46,9 @@ Mellon the rights to redistribute these changes without encumbrance. /* * HISTORY * $Log: cfs_subr.c,v $ + * Revision 1.1.1.1 1998/08/29 21:14:52 rvb + * Very Preliminary Coda + * * Revision 1.11 1998/08/28 18:12:18 rvb * Now it also works on FreeBSD -current. This code will be * committed to the FreeBSD -current and NetBSD -current @@ -202,8 +207,8 @@ Mellon the rights to redistribute these changes without encumbrance. #include <sys/param.h> #include <sys/systm.h> -#include <sys/malloc.h> #include <sys/proc.h> +#include <sys/malloc.h> #include <sys/select.h> #include <sys/mount.h> @@ -212,8 +217,6 @@ Mellon the rights to redistribute these changes without encumbrance. #include <cfs/cfs_subr.h> #include <cfs/cfsnc.h> -#if NVCFS - int cfs_active = 0; int cfs_reuse = 0; int cfs_new = 0; @@ -221,11 +224,8 @@ int cfs_new = 0; struct cnode *cfs_freelist = NULL; struct cnode *cfs_cache[CFS_CACHESIZE]; -#define cfshash(fid) \ - (((fid)->Volume + (fid)->Vnode) & (CFS_CACHESIZE-1)) - +#define cfshash(fid) (((fid)->Volume + (fid)->Vnode) & (CFS_CACHESIZE-1)) #define CNODE_NEXT(cp) ((cp)->c_next) - #define ODD(vnode) ((vnode) & 0x1) /* @@ -690,24 +690,13 @@ int cfs_vmflush(cp) struct cnode *cp; { -#if 0 - /* old code */ - /* Unset <device, inode> so that page_read doesn't try to use - (possibly) invalid cache file. */ - cp->c_device = 0; - cp->c_inode = 0; - - return(inode_uncache_try(VTOI(CTOV(cp))) ? 0 : ETXTBSY); -#else /* __NetBSD__ || __FreeBSD__ */ return 0; -#endif /* __NetBSD__ || __FreeBSD__ */ } /* * kernel-internal debugging switches */ - void cfs_debugon(void) { cfsdebug = -1; @@ -745,6 +734,3 @@ void cfs_debugoff(void) * 13) all <= 3 * ... */ - - -#endif /* NVCFS */ |