Index: TODO =================================================================== RCS file: /home/hiten/ncvs/src/sys/coda/TODO,v retrieving revision 1.2 diff -u -r1.2 TODO --- TODO 2 Sep 1998 19:09:53 -0000 1.2 +++ TODO 14 Dec 2002 13:45:58 -0000 @@ -1,6 +1,3 @@ -OOPS: - FreeBSD does not fsync!!! - Near term: Fix bug in executing/mapping new files. cfs_mount bug: interaction with cfs_inactive no cfs_unsave. Index: coda_subr.c =================================================================== RCS file: /home/hiten/ncvs/src/sys/coda/coda_subr.c,v retrieving revision 1.22 diff -u -r1.22 coda_subr.c --- coda_subr.c 25 Sep 2002 02:33:29 -0000 1.22 +++ coda_subr.c 14 Dec 2002 13:39:19 -0000 @@ -219,7 +219,7 @@ #endif count++; CODADEBUG(CODA_FLUSH, - myprintf(("Live cnode fid %lx.%lx.%lx flags %d count %d\n", + myprintf(("Live cnode fid %lx.%lx.%lx flags %d count %ld\n", (cp->c_fid).Volume, (cp->c_fid).Vnode, (cp->c_fid).Unique, @@ -269,7 +269,7 @@ for (cp = coda_cache[hash]; cp != NULL; cp = CNODE_NEXT(cp)) { - myprintf(("Live cnode fid %lx.%lx.%lx count %d\n", + myprintf(("Live cnode fid %lx.%lx.%lx count %ld\n", (cp->c_fid).Volume,(cp->c_fid).Vnode, (cp->c_fid).Unique, vrefcnt(CTOV(cp)))); } @@ -417,7 +417,7 @@ if (CTOV(cp)->v_vflag & VV_TEXT) error = coda_vmflush(cp); CODADEBUG(CODA_ZAPFILE, myprintf(( -"zapfile: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n", +"zapfile: fid = (%lx.%lx.%lx), refcnt = %ld, 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) { @@ -443,7 +443,7 @@ coda_nc_zapParentfid(&out->coda_zapdir.CodaFid, IS_DOWNCALL); CODADEBUG(CODA_ZAPDIR, myprintf(( -"zapdir: fid = (%lx.%lx.%lx), refcnt = %d\n", +"zapdir: fid = (%lx.%lx.%lx), refcnt = %ld\n", cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique, vrefcnt(CTOV(cp)) - 1));); if (vrefcnt(CTOV(cp)) == 1) { @@ -477,7 +477,7 @@ error = coda_vmflush(cp); } - CODADEBUG(CODA_PURGEFID, myprintf(("purgefid: fid = (%lx.%lx.%lx), refcnt = %d, error = %d\n", + CODADEBUG(CODA_PURGEFID, myprintf(("purgefid: fid = (%lx.%lx.%lx), refcnt = %ld, error = %d\n", cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique, vrefcnt(CTOV(cp)) - 1, error));); Index: coda_vnops.c =================================================================== RCS file: /home/hiten/ncvs/src/sys/coda/coda_vnops.c,v retrieving revision 1.44 diff -u -r1.44 coda_vnops.c --- coda_vnops.c 25 Sep 2002 02:33:29 -0000 1.44 +++ coda_vnops.c 14 Dec 2002 13:56:57 -0000 @@ -1663,7 +1663,7 @@ } /* Have UFS handle the call. */ - CODADEBUG(CODA_READDIR, myprintf(("indirect readdir: fid = (%lx.%lx.%lx), refcnt = %d\n",cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique, vrefcnt(vp))); ) + CODADEBUG(CODA_READDIR, myprintf(("indirect readdir: fid = (%lx.%lx.%lx), refcnt = %ld\n",cp->c_fid.Volume, cp->c_fid.Vnode, cp->c_fid.Unique, vrefcnt(vp))); ) error = VOP_READDIR(cp->c_ovp, uiop, cred, eofflag, ncookies, cookies); @@ -1975,4 +1975,46 @@ } return cp; +} + +static int +coda_getpages(struct vop_getpages_args *ap) +{ + struct vnode *vp = ap->a_vp; + struct cnode *cp = VTOC(vp); + struct thread *td = curthread; + int error; + + /* Check for control object. */ + if (IS_CTL_VP(vp)) { + return (EINVAL); + } + + error = VOP_OPEN(vp, FREAD, td->t_ucred, td); + if (error) + return error; + + ap->a_vp = cp->c_ovp; + error = VOCALL(ap->a_vp->v_op, VOFFSET(vop_getpages), ap); + (void) VOP_CLOSE(vp, FREAD, td->t_ucred, td); + return error; +} + +static int +coda_putpages(struct vop_putpages_args *ap) +{ + struct vnode *vp = ap->a_vp; + + /* Check for control object. */ + if (IS_CTL_VP(vp)) { + return (EINVAL); + } + + /* + * XXX + * we'd like to do something useful here for msync(), + * but that turns out to be hard. + */ + + return 0; }