Deleted Added
full compact
55c55
< __FBSDID("$FreeBSD: head/sys/fs/coda/coda_subr.c 116173 2003-06-10 21:29:12Z obrien $");
---
> __FBSDID("$FreeBSD: head/sys/fs/coda/coda_subr.c 119832 2003-09-07 07:43:10Z tjr $");
77d76
< #define coda_hash(fid) (((fid)->Volume + (fid)->Vnode) & (CODA_CACHESIZE-1))
79d77
< #define ODD(vnode) ((vnode) & 0x1)
80a79,87
> #ifdef CODA_COMPAT_5
> #define coda_hash(fid) \
> (((fid)->Volume + (fid)->Vnode) & (CODA_CACHESIZE-1))
> #define IS_DIR(cnode) (cnode.Vnode & 0x1)
> #else
> #define coda_hash(fid) (coda_f2i(fid) & (CODA_CACHESIZE-1))
> #define IS_DIR(cnode) (cnode.opaque[2] & 0x1)
> #endif
>
164c171
< ViceFid *fid;
---
> CodaFid *fid;
170,172c177
< if ((cp->c_fid.Vnode == fid->Vnode) &&
< (cp->c_fid.Volume == fid->Volume) &&
< (cp->c_fid.Unique == fid->Unique) &&
---
> if (coda_fid_eq(&(cp->c_fid), fid) &&
221,226c226,229
< myprintf(("Live cnode fid %lx.%lx.%lx flags %d count %d\n",
< (cp->c_fid).Volume,
< (cp->c_fid).Vnode,
< (cp->c_fid).Unique,
< cp->c_flags,
< vrefcnt(CTOV(cp)))); );
---
> myprintf(("Live cnode fid %s flags %d count %d\n",
> coda_f2s(&cp->c_fid),
> cp->c_flags,
> vrefcnt(CTOV(cp)))); );
251c254
< if (!ODD(cp->c_fid.Vnode)) /* only files can be executed */
---
> if (!IS_DIR(cp->c_fid)) /* only files can be executed */
271,273c274,275
< myprintf(("Live cnode fid %lx.%lx.%lx count %d\n",
< (cp->c_fid).Volume,(cp->c_fid).Vnode,
< (cp->c_fid).Unique, vrefcnt(CTOV(cp))));
---
> myprintf(("Live cnode fid %s count %d\n",
> coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount));
376c378
< * CODA_REPLACE -- replace one ViceFid with another throughout the name cache
---
> * CODA_REPLACE -- replace one CodaFid with another throughout the name cache
398a401
> #ifdef CODA_COMPAT_5
399a403,405
> #else
> coda_nc_purge_user(out->coda_purgeuser.uid, IS_DOWNCALL);
> #endif
410c416
< cp = coda_find(&out->coda_zapfile.CodaFid);
---
> cp = coda_find(&out->coda_zapfile.Fid);
418,422c424,427
< CODADEBUG(CODA_ZAPFILE, myprintf((
< "zapfile: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n",
< cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique,
< vrefcnt(CTOV(cp)) - 1, error)););
< if (vrefcnt(CTOV(cp)) == 1) {
---
> CODADEBUG(CODA_ZAPFILE,
> myprintf(("zapfile: fid = %s, refcnt = %d, error = %d\n",
> coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount - 1, error)););
> if (vrefcnt(CTOV(cp)) == 1) {
437c442
< cp = coda_find(&out->coda_zapdir.CodaFid);
---
> cp = coda_find(&out->coda_zapdir.Fid);
442c447
< coda_nc_zapParentfid(&out->coda_zapdir.CodaFid, IS_DOWNCALL);
---
> coda_nc_zapParentfid(&out->coda_zapdir.Fid, IS_DOWNCALL);
445,447c450,451
< "zapdir: fid = (%lx.%lx.%lx), refcnt = %d\n",
< cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique,
< vrefcnt(CTOV(cp)) - 1)););
---
> "zapdir: fid = %s, refcnt = %d\n",
> coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount - 1)););
464c468
< cp = coda_find(&out->coda_purgefid.CodaFid);
---
> cp = coda_find(&out->coda_purgefid.Fid);
467,469c471,472
< if (ODD(out->coda_purgefid.CodaFid.Vnode)) { /* Vnode is a directory */
< coda_nc_zapParentfid(&out->coda_purgefid.CodaFid,
< IS_DOWNCALL);
---
> if (IS_DIR(out->coda_purgefid.Fid)) { /* Vnode is a directory */
> coda_nc_zapParentfid(&out->coda_purgefid.Fid,IS_DOWNCALL);
472c475
< coda_nc_zapfid(&out->coda_purgefid.CodaFid, IS_DOWNCALL);
---
> coda_nc_zapfid(&out->coda_purgefid.Fid, IS_DOWNCALL);
474c477
< if (!(ODD(out->coda_purgefid.CodaFid.Vnode))
---
> if (!(IS_DIR(out->coda_purgefid.Fid))
479,482c482,484
< CODADEBUG(CODA_PURGEFID, myprintf(("purgefid: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n",
< cp->c_fid.Volume, cp->c_fid.Vnode,
< cp->c_fid.Unique,
< vrefcnt(CTOV(cp)) - 1, error)););
---
> CODADEBUG(CODA_PURGEFID, myprintf((
> "purgefid: fid = %s, refcnt = %d, error = %d\n",
> coda_f2s(&cp->c_fid), CTOV(cp)->v_usecount - 1, error)););
505,511c507,510
< 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,
< cp->c_fid.Volume, cp->c_fid.Vnode,
< cp->c_fid.Unique, cp));)
< vrele(CTOV(cp));
---
> CODADEBUG(CODA_REPLACE, myprintf((
> "replace: oldfid = %s, newfid = %s, cp = %p\n",
> coda_f2s(&out->coda_replace.OldFid),
> coda_f2s(&cp->c_fid), cp));) vrele(CTOV(cp));