Deleted Added
full compact
71c71
< * Bring RVB_CFS1_1 to HEAD
---
> * Bring RVB_CODA1_1 to HEAD
111c111
< * Removed cfsnc_replace, replaced it with a cfs_find, unhash, and
---
> * Removed cfsnc_replace, replaced it with a coda_find, unhash, and
126c126
< * Added CFS-specific files
---
> * Added CODA-specific files
164c164
< * Also, included his cfs_flush routine in place of the former cfsnc_flush.
---
> * Also, included his coda_flush routine in place of the former coda_nc_flush.
199c199
< * 1. Added cfs_unmounting to mark all cnodes as being UNMOUNTING. This has to
---
> * 1. Added coda_unmounting to mark all cnodes as being UNMOUNTING. This has to
201c201
< * dounmount calls before cfs_unmounted might try to force flushes to venus.
---
> * dounmount calls before coda_unmounted might try to force flushes to venus.
203c203
< * 2. cfs_unmounting marks all cnodes scanning cfs_cache.
---
> * 2. coda_unmounting marks all cnodes scanning coda_cache.
206c206
< * 4. cfs_cacheprint (under DEBUG) prints names with vnode/cnode address
---
> * 4. coda_cacheprint (under DEBUG) prints names with vnode/cnode address
209c209
< #include <vcfs.h>
---
> #include <vcoda.h>
223,225c223,225
< int cfs_active = 0;
< int cfs_reuse = 0;
< int cfs_new = 0;
---
> int coda_active = 0;
> int coda_reuse = 0;
> int coda_new = 0;
227,228c227,228
< struct cnode *cfs_freelist = NULL;
< struct cnode *cfs_cache[CFS_CACHESIZE];
---
> struct cnode *coda_freelist = NULL;
> struct cnode *coda_cache[CODA_CACHESIZE];
230c230
< #define cfshash(fid) (((fid)->Volume + (fid)->Vnode) & (CFS_CACHESIZE-1))
---
> #define coda_hash(fid) (((fid)->Volume + (fid)->Vnode) & (CODA_CACHESIZE-1))
238c238
< cfs_alloc(void)
---
> coda_alloc(void)
242,245c242,245
< if (cfs_freelist) {
< cp = cfs_freelist;
< cfs_freelist = CNODE_NEXT(cp);
< cfs_reuse++;
---
> if (coda_freelist) {
> cp = coda_freelist;
> coda_freelist = CNODE_NEXT(cp);
> coda_reuse++;
248c248
< CFS_ALLOC(cp, struct cnode *, sizeof(struct cnode));
---
> CODA_ALLOC(cp, struct cnode *, sizeof(struct cnode));
253c253
< cfs_new++;
---
> coda_new++;
264c264
< cfs_free(cp)
---
> coda_free(cp)
268,269c268,269
< CNODE_NEXT(cp) = cfs_freelist;
< cfs_freelist = cp;
---
> CNODE_NEXT(cp) = coda_freelist;
> coda_freelist = cp;
276c276
< cfs_save(cp)
---
> coda_save(cp)
279,280c279,280
< CNODE_NEXT(cp) = cfs_cache[cfshash(&cp->c_fid)];
< cfs_cache[cfshash(&cp->c_fid)] = cp;
---
> CNODE_NEXT(cp) = coda_cache[coda_hash(&cp->c_fid)];
> coda_cache[coda_hash(&cp->c_fid)] = cp;
287c287
< cfs_unsave(cp)
---
> coda_unsave(cp)
293c293
< ptr = cfs_cache[cfshash(&cp->c_fid)];
---
> ptr = coda_cache[coda_hash(&cp->c_fid)];
297c297
< cfs_cache[cfshash(&cp->c_fid)]
---
> coda_cache[coda_hash(&cp->c_fid)]
316c316
< cfs_find(fid)
---
> coda_find(fid)
321c321
< cp = cfs_cache[cfshash(fid)];
---
> cp = coda_cache[coda_hash(fid)];
328c328
< cfs_active++;
---
> coda_active++;
337c337
< * cfs_kill is called as a side effect to vcopen. To prevent any
---
> * coda_kill is called as a side effect to vcopen. To prevent any
341c341
< * cfs_inactive of course!). Since multiple venii/wardens can be
---
> * coda_inactive of course!). Since multiple venii/wardens can be
343c343
< * cfs_mnttbl. -- DCS 12/1/94 */
---
> * coda_mnttbl. -- DCS 12/1/94 */
346c346
< cfs_kill(whoIam, dcstat)
---
> coda_kill(whoIam, dcstat)
364c364
< cfsnc_flush(dcstat);
---
> coda_nc_flush(dcstat);
366,367c366,367
< for (hash = 0; hash < CFS_CACHESIZE; hash++) {
< for (cp = cfs_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
---
> for (hash = 0; hash < CODA_CACHESIZE; hash++) {
> for (cp = coda_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
370c370
< printf("cfs_kill: vp %p, cp %p\n", CTOV(cp), cp);
---
> printf("coda_kill: vp %p, cp %p\n", CTOV(cp), cp);
373c373
< CFSDEBUG(CFS_FLUSH,
---
> CODADEBUG(CODA_FLUSH,
391c391
< cfs_flush(dcstat)
---
> coda_flush(dcstat)
397,398c397,398
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_FLUSH]++;
---
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_FLUSH]++;
400c400
< cfsnc_flush(dcstat); /* flush files from the name cache */
---
> coda_nc_flush(dcstat); /* flush files from the name cache */
402,403c402,403
< for (hash = 0; hash < CFS_CACHESIZE; hash++) {
< for (cp = cfs_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
---
> for (hash = 0; hash < CODA_CACHESIZE; hash++) {
> for (cp = coda_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
405c405
< cfs_vmflush(cp);
---
> coda_vmflush(cp);
415c415
< cfs_testflush(void)
---
> coda_testflush(void)
420,421c420,421
< for (hash = 0; hash < CFS_CACHESIZE; hash++) {
< for (cp = cfs_cache[hash];
---
> for (hash = 0; hash < CODA_CACHESIZE; hash++) {
> for (cp = coda_cache[hash];
438c438
< cfs_unmounting(whoIam)
---
> coda_unmounting(whoIam)
444,445c444,445
< for (hash = 0; hash < CFS_CACHESIZE; hash++) {
< for (cp = cfs_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
---
> for (hash = 0; hash < CODA_CACHESIZE; hash++) {
> for (cp = coda_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
448c448
< printf("cfs_unmounting: Unlocking %p\n", cp);
---
> printf("coda_unmounting: Unlocking %p\n", cp);
459,460c459
< void
< cfs_checkunmounting(mp)
---
> coda_checkunmounting(mp)
481,482c480,481
< void
< cfs_cacheprint(whoIam)
---
> int
> coda_cacheprint(whoIam)
489,490c488,489
< printf("cfs_cacheprint: cfs_ctlvp %p, cp %p", cfs_ctlvp, VTOC(cfs_ctlvp));
< cfsnc_name(VTOC(cfs_ctlvp));
---
> printf("coda_cacheprint: coda_ctlvp %p, cp %p", coda_ctlvp, VTOC(coda_ctlvp));
> coda_nc_name(coda_ctlvp);
493,494c492,493
< for (hash = 0; hash < CFS_CACHESIZE; hash++) {
< for (cp = cfs_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
---
> for (hash = 0; hash < CODA_CACHESIZE; hash++) {
> for (cp = coda_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) {
496,497c495,496
< printf("cfs_cacheprint: vp %p, cp %p", CTOV(cp), cp);
< cfsnc_name(cp);
---
> printf("coda_cacheprint: vp %p, cp %p", CTOV(cp), cp);
> coda_nc_name(cp);
503c502
< printf("cfs_cacheprint: count %d\n", count);
---
> printf("coda_cacheprint: count %d\n", count);
511,512c510,511
< * CFS_FLUSH -- flush all entries from the name cache and the cnode cache.
< * CFS_PURGEUSER -- flush all entries from the name cache for a specific user
---
> * CODA_FLUSH -- flush all entries from the name cache and the cnode cache.
> * CODA_PURGEUSER -- flush all entries from the name cache for a specific user
516c515
< * CFS_ZAPDIR -- flush the attributes for the dir from its cnode.
---
> * CODA_ZAPDIR -- flush the attributes for the dir from its cnode.
518c517
< * CFS_ZAPFILE -- flush the attributes for a file.
---
> * CODA_ZAPFILE -- flush the attributes for a file.
521c520
< * CFS_PURGEFID -- flush the attribute for the file
---
> * CODA_PURGEFID -- flush the attribute for the file
529c528
< * CFS_REPLACE -- replace one ViceFid with another throughout the name cache
---
> * CODA_REPLACE -- replace one ViceFid with another throughout the name cache
539c538
< case CFS_FLUSH : {
---
> case CODA_FLUSH : {
541c540
< cfs_flush(IS_DOWNCALL);
---
> coda_flush(IS_DOWNCALL);
543c542
< CFSDEBUG(CFS_FLUSH,cfs_testflush();) /* print remaining cnodes */
---
> CODADEBUG(CODA_FLUSH,coda_testflush();) /* print remaining cnodes */
547,549c546,548
< case CFS_PURGEUSER : {
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_PURGEUSER]++;
---
> case CODA_PURGEUSER : {
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_PURGEUSER]++;
552c551
< cfsnc_purge_user(out->cfs_purgeuser.cred.cr_uid, IS_DOWNCALL);
---
> coda_nc_purge_user(out->coda_purgeuser.cred.cr_uid, IS_DOWNCALL);
556c555
< case CFS_ZAPFILE : {
---
> case CODA_ZAPFILE : {
560,561c559,560
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_ZAPFILE]++;
---
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_ZAPFILE]++;
563c562
< cp = cfs_find(&out->cfs_zapfile.CodaFid);
---
> cp = coda_find(&out->coda_zapfile.CodaFid);
569,570c568,569
< error = cfs_vmflush(cp);
< CFSDEBUG(CFS_ZAPFILE, myprintf(("zapfile: fid = (%lx.%lx.%lx),
---
> error = coda_vmflush(cp);
> CODADEBUG(CODA_ZAPFILE, myprintf(("zapfile: fid = (%lx.%lx.%lx),
585c584
< case CFS_ZAPDIR : {
---
> case CODA_ZAPDIR : {
588,589c587,588
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_ZAPDIR]++;
---
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_ZAPDIR]++;
591c590
< cp = cfs_find(&out->cfs_zapdir.CodaFid);
---
> cp = coda_find(&out->coda_zapdir.CodaFid);
596c595
< cfsnc_zapParentfid(&out->cfs_zapdir.CodaFid, IS_DOWNCALL);
---
> coda_nc_zapParentfid(&out->coda_zapdir.CodaFid, IS_DOWNCALL);
598c597
< CFSDEBUG(CFS_ZAPDIR, myprintf(("zapdir: fid = (%lx.%lx.%lx),
---
> CODADEBUG(CODA_ZAPDIR, myprintf(("zapdir: fid = (%lx.%lx.%lx),
612,614c611,613
< case CFS_ZAPVNODE : {
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_ZAPVNODE]++;
---
> case CODA_ZAPVNODE : {
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_ZAPVNODE]++;
616c615
< myprintf(("CFS_ZAPVNODE: Called, but uniplemented\n"));
---
> myprintf(("CODA_ZAPVNODE: Called, but uniplemented\n"));
623c622
< /* cfsnc_zapvnode(&out->cfs_zapvnode.VFid, &out->cfs_zapvnode.cred,
---
> /* coda_nc_zapvnode(&out->coda_zapvnode.VFid, &out->coda_zapvnode.cred,
628c627
< case CFS_PURGEFID : {
---
> case CODA_PURGEFID : {
632,633c631,632
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_PURGEFID]++;
---
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_PURGEFID]++;
635c634
< cp = cfs_find(&out->cfs_purgefid.CodaFid);
---
> cp = coda_find(&out->coda_purgefid.CodaFid);
638,639c637,638
< if (ODD(out->cfs_purgefid.CodaFid.Vnode)) { /* Vnode is a directory */
< cfsnc_zapParentfid(&out->cfs_purgefid.CodaFid,
---
> if (ODD(out->coda_purgefid.CodaFid.Vnode)) { /* Vnode is a directory */
> coda_nc_zapParentfid(&out->coda_purgefid.CodaFid,
643,644c642,643
< cfsnc_zapfid(&out->cfs_purgefid.CodaFid, IS_DOWNCALL);
< if (!(ODD(out->cfs_purgefid.CodaFid.Vnode))
---
> coda_nc_zapfid(&out->coda_purgefid.CodaFid, IS_DOWNCALL);
> if (!(ODD(out->coda_purgefid.CodaFid.Vnode))
647c646
< error = cfs_vmflush(cp);
---
> error = coda_vmflush(cp);
649c648
< CFSDEBUG(CFS_PURGEFID, myprintf(("purgefid: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n",
---
> CODADEBUG(CODA_PURGEFID, myprintf(("purgefid: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n",
661c660
< case CFS_REPLACE : {
---
> case CODA_REPLACE : {
664,665c663,664
< cfs_clstat.ncalls++;
< cfs_clstat.reqs[CFS_REPLACE]++;
---
> coda_clstat.ncalls++;
> coda_clstat.reqs[CODA_REPLACE]++;
667c666
< cp = cfs_find(&out->cfs_replace.OldFid);
---
> cp = coda_find(&out->coda_replace.OldFid);
671,673c670,672
< cfs_unsave(cp);
< cp->c_fid = out->cfs_replace.NewFid;
< cfs_save(cp);
---
> coda_unsave(cp);
> cp->c_fid = out->coda_replace.NewFid;
> coda_save(cp);
675,678c674,677
< CFSDEBUG(CFS_REPLACE, myprintf(("replace: oldfid = (%lx.%lx.%lx), newfid = (%lx.%lx.%lx), cp = %p\n",
< out->cfs_replace.OldFid.Volume,
< out->cfs_replace.OldFid.Vnode,
< out->cfs_replace.OldFid.Unique,
---
> CODADEBUG(CODA_REPLACE, myprintf(("replace: oldfid = (%lx.%lx.%lx), newfid = (%lx.%lx.%lx), cp = %p\n",
> out->coda_replace.OldFid.Volume,
> out->coda_replace.OldFid.Vnode,
> out->coda_replace.OldFid.Unique,
691c690
< /* cfs_grab_vnode: lives in either cfs_mach.c or cfs_nbsd.c */
---
> /* coda_grab_vnode: lives in either cfs_mach.c or cfs_nbsd.c */
694c693
< cfs_vmflush(cp)
---
> coda_vmflush(cp)
704c703
< void cfs_debugon(void)
---
> void coda_debugon(void)
706,710c705,709
< cfsdebug = -1;
< cfsnc_debug = -1;
< cfs_vnop_print_entry = 1;
< cfs_psdev_print_entry = 1;
< cfs_vfsop_print_entry = 1;
---
> codadebug = -1;
> coda_nc_debug = -1;
> coda_vnop_print_entry = 1;
> coda_psdev_print_entry = 1;
> coda_vfsop_print_entry = 1;
713c712
< void cfs_debugoff(void)
---
> void coda_debugoff(void)
715,719c714,718
< cfsdebug = 0;
< cfsnc_debug = 0;
< cfs_vnop_print_entry = 0;
< cfs_psdev_print_entry = 0;
< cfs_vfsop_print_entry = 0;
---
> codadebug = 0;
> coda_nc_debug = 0;
> coda_vnop_print_entry = 0;
> coda_psdev_print_entry = 0;
> coda_vfsop_print_entry = 0;