Cleanup and fix THE bug

This commit is contained in:
rvb 1998-09-28 20:52:58 +00:00
parent 29db15fb20
commit c2e5b5e9f0
8 changed files with 78 additions and 44 deletions

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_fbsd.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_fbsd.c,v 1.5 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -59,7 +59,8 @@
#ifdef DEVFS
#include <sys/devfsext.h>
static void *devfs_token[NVCODA];
static void *cfs_devfs_token[NVCODA];
static void *coda_devfs_token[NVCODA];
#endif
/*
@ -121,18 +122,20 @@ vc_drvinit(void *unused)
vc_devsw_installed = 1;
}
#ifdef DEVFS
/* tmp */
#undef NVCODA
#define NVCODA 1
for (i = 0; i < NVCODA; i++) {
devfs_token[i] =
devfs_add_devswf(&codadevsw, i
DV_CHR, 0, 0, 0666,
cfs_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"cfs%d", i);
devfs_token[i] =
devfs_add_devswf(&codadevsw, i
DV_CHR, 0, 0, 0666,
coda_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"coda%d", i);
}
#endif
}
int
@ -140,12 +143,10 @@ coda_fbsd_getpages(v)
void *v;
{
struct vop_getpages_args *ap = v;
struct vnode *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
int ret = 0;
#if 1
/*??? a_offset */
/* ??? a_offset */
ret = vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
ap->a_reqpage);
return ret;

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_namecache.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_namecache.c,v 1.5 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_namecache.c,v 1.6 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -47,6 +47,11 @@
/*
* HISTORY
* $Log: coda_namecache.c,v $
* Revision 1.6 1998/09/25 17:38:31 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.5 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -283,7 +288,7 @@ coda_nc_init(void)
bzero(&coda_nc_stat, (sizeof(struct coda_nc_statistics)));
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("CODA NAME CACHE: CACHE %d, HASH TBL %d\n", CODA_NC_CACHESIZE, CODA_NC_HASHSIZE);
#endif
CODA_ALLOC(coda_nc_heap, struct coda_cache *, TOTAL_CACHE_SIZE);

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_psdev.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_psdev.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_psdev.c,v 1.5 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -53,6 +53,11 @@
/*
* HISTORY
* $Log: coda_psdev.c,v $
* Revision 1.5 1998/09/25 17:38:31 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.4 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -621,12 +626,12 @@ coda_call(mntinfo, inSize, outSize, buffer)
if (error == 0)
break;
else if (error == EWOULDBLOCK) {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_call: tsleep TIMEOUT %d sec\n", 2+2*i);
#endif
} else if (p->p_siglist == sigmask(SIGIO)) {
p->p_sigmask |= p->p_siglist;
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_call: tsleep returns %d SIGIO, cnt %d\n", error, i);
#endif
} else {
@ -656,7 +661,7 @@ coda_call(mntinfo, inSize, outSize, buffer)
else if (!(vmp->vm_flags & VM_READ)) {
/* Interrupted before venus read it. */
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
if (1)
#else
if (codadebug)
@ -674,7 +679,7 @@ coda_call(mntinfo, inSize, outSize, buffer)
struct coda_in_hdr *dog;
struct vmsg *svmp;
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
if (1)
#else
if (codadebug)

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_vnops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_vnops.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_vnops.c,v 1.5 1998/09/25 17:38:32 rvb Exp $
*
*/
@ -48,6 +48,11 @@
/*
* HISTORY
* $Log: coda_vnops.c,v $
* Revision 1.5 1998/09/25 17:38:32 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.4 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -515,13 +520,13 @@ coda_close(v)
if (IS_UNMOUNTING(cp)) {
if (cp->c_ovp) {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_close: destroying container ref %d, ufs vp %p of vp %p/cp %p\n",
vp->v_usecount, cp->c_ovp, vp, cp);
#endif
vgone(cp->c_ovp);
} else {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_close: NO container vp %p/cp %p\n", vp, cp);
#endif
}
@ -1910,6 +1915,7 @@ coda_bmap(v)
cp = VTOC(vp);
if (cp->c_ovp) {
return EINVAL;
ret = VOP_BMAP(cp->c_ovp, bn, vpp, bnp, ap->a_runp, ap->a_runb);
#if 0
printf("VOP_BMAP(cp->c_ovp %p, bn %p, vpp %p, bnp %p, ap->a_runp %p, ap->a_runb %p) = %d\n",

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_fbsd.cr,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_fbsd.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_fbsd.c,v 1.5 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -59,7 +59,8 @@
#ifdef DEVFS
#include <sys/devfsext.h>
static void *devfs_token[NVCODA];
static void *cfs_devfs_token[NVCODA];
static void *coda_devfs_token[NVCODA];
#endif
/*
@ -121,18 +122,20 @@ vc_drvinit(void *unused)
vc_devsw_installed = 1;
}
#ifdef DEVFS
/* tmp */
#undef NVCODA
#define NVCODA 1
for (i = 0; i < NVCODA; i++) {
devfs_token[i] =
devfs_add_devswf(&codadevsw, i
DV_CHR, 0, 0, 0666,
cfs_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"cfs%d", i);
devfs_token[i] =
devfs_add_devswf(&codadevsw, i
DV_CHR, 0, 0, 0666,
coda_devfs_token[i] =
devfs_add_devswf(&codadevsw, i,
DV_CHR, UID_ROOT, GID_WHEEL, 0666,
"coda%d", i);
}
#endif
}
int
@ -140,12 +143,10 @@ coda_fbsd_getpages(v)
void *v;
{
struct vop_getpages_args *ap = v;
struct vnode *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
int ret = 0;
#if 1
/*??? a_offset */
/* ??? a_offset */
ret = vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
ap->a_reqpage);
return ret;

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_namecache.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_namecache.c,v 1.5 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_namecache.c,v 1.6 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -47,6 +47,11 @@
/*
* HISTORY
* $Log: coda_namecache.c,v $
* Revision 1.6 1998/09/25 17:38:31 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.5 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -283,7 +288,7 @@ coda_nc_init(void)
bzero(&coda_nc_stat, (sizeof(struct coda_nc_statistics)));
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("CODA NAME CACHE: CACHE %d, HASH TBL %d\n", CODA_NC_CACHESIZE, CODA_NC_HASHSIZE);
#endif
CODA_ALLOC(coda_nc_heap, struct coda_cache *, TOTAL_CACHE_SIZE);

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_psdev.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_psdev.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_psdev.c,v 1.5 1998/09/25 17:38:31 rvb Exp $
*
*/
@ -53,6 +53,11 @@
/*
* HISTORY
* $Log: coda_psdev.c,v $
* Revision 1.5 1998/09/25 17:38:31 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.4 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -621,12 +626,12 @@ coda_call(mntinfo, inSize, outSize, buffer)
if (error == 0)
break;
else if (error == EWOULDBLOCK) {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_call: tsleep TIMEOUT %d sec\n", 2+2*i);
#endif
} else if (p->p_siglist == sigmask(SIGIO)) {
p->p_sigmask |= p->p_siglist;
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_call: tsleep returns %d SIGIO, cnt %d\n", error, i);
#endif
} else {
@ -656,7 +661,7 @@ coda_call(mntinfo, inSize, outSize, buffer)
else if (!(vmp->vm_flags & VM_READ)) {
/* Interrupted before venus read it. */
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
if (1)
#else
if (codadebug)
@ -674,7 +679,7 @@ coda_call(mntinfo, inSize, outSize, buffer)
struct coda_in_hdr *dog;
struct vmsg *svmp;
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
if (1)
#else
if (codadebug)

View File

@ -27,7 +27,7 @@
* Mellon the rights to redistribute these changes without encumbrance.
*
* @(#) src/sys/coda/coda_vnops.c,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $
* $Id: coda_vnops.c,v 1.4 1998/09/13 13:57:59 rvb Exp $
* $Id: coda_vnops.c,v 1.5 1998/09/25 17:38:32 rvb Exp $
*
*/
@ -48,6 +48,11 @@
/*
* HISTORY
* $Log: coda_vnops.c,v $
* Revision 1.5 1998/09/25 17:38:32 rvb
* Put "stray" printouts under DIAGNOSTIC. Make everything build
* with DEBUG on. Add support for lkm. (The macro's don't work
* for me; for a good chuckle look at the end of coda_fbsd.c.)
*
* Revision 1.4 1998/09/13 13:57:59 rvb
* Finish conversion of cfs -> coda
*
@ -515,13 +520,13 @@ coda_close(v)
if (IS_UNMOUNTING(cp)) {
if (cp->c_ovp) {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_close: destroying container ref %d, ufs vp %p of vp %p/cp %p\n",
vp->v_usecount, cp->c_ovp, vp, cp);
#endif
vgone(cp->c_ovp);
} else {
#ifdef DIAGNOSTIC
#ifdef CODA_VERBOSE
printf("coda_close: NO container vp %p/cp %p\n", vp, cp);
#endif
}
@ -1910,6 +1915,7 @@ coda_bmap(v)
cp = VTOC(vp);
if (cp->c_ovp) {
return EINVAL;
ret = VOP_BMAP(cp->c_ovp, bn, vpp, bnp, ap->a_runp, ap->a_runb);
#if 0
printf("VOP_BMAP(cp->c_ovp %p, bn %p, vpp %p, bnp %p, ap->a_runp %p, ap->a_runb %p) = %d\n",