Record the proc directly, not the pid, of the MFS server process,

and nuke the spare fields in the mfsnode.
This commit is contained in:
thorpej 2000-05-16 00:24:08 +00:00
parent 47490d3527
commit 6d7f14dc5d
3 changed files with 10 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfs_vfsops.c,v 1.25 2000/03/30 12:41:14 augustss Exp $ */
/* $NetBSD: mfs_vfsops.c,v 1.26 2000/05/16 00:24:08 thorpej Exp $ */
/*
* Copyright (c) 1989, 1990, 1993, 1994
@ -156,7 +156,7 @@ mfs_mountroot()
mfsp->mfs_baseoff = mfs_rootbase;
mfsp->mfs_size = mfs_rootsize;
mfsp->mfs_vnode = rootvp;
mfsp->mfs_pid = p->p_pid;
mfsp->mfs_proc = NULL; /* indicate kernel space */
BUFQ_INIT(&mfsp->mfs_buflist);
if ((error = ffs_mountfs(rootvp, mp, p)) != 0) {
mp->mnt_op->vfs_refcount--;
@ -259,7 +259,7 @@ mfs_mount(mp, path, data, ndp, p)
mfsp->mfs_baseoff = args.base;
mfsp->mfs_size = args.size;
mfsp->mfs_vnode = devvp;
mfsp->mfs_pid = p->p_pid;
mfsp->mfs_proc = p;
BUFQ_INIT(&mfsp->mfs_buflist);
if ((error = ffs_mountfs(devvp, mp, p)) != 0) {
BUFQ_FIRST(&mfsp->mfs_buflist) = (struct buf *) -1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfs_vnops.c,v 1.20 2000/03/30 12:41:14 augustss Exp $ */
/* $NetBSD: mfs_vnops.c,v 1.21 2000/05/16 00:24:08 thorpej Exp $ */
/*
* Copyright (c) 1989, 1993
@ -150,7 +150,7 @@ mfs_strategy(v)
panic("mfs_strategy: bad dev");
mfsp = VTOMFS(vp);
/* check for mini-root access */
if (mfsp->mfs_pid == 0) {
if (mfsp->mfs_proc == NULL) {
caddr_t base;
base = mfsp->mfs_baseoff + (bp->b_blkno << DEV_BSHIFT);
@ -159,7 +159,7 @@ mfs_strategy(v)
else
memcpy(base, bp->b_data, bp->b_bcount);
biodone(bp);
} else if (mfsp->mfs_pid == p->p_pid) {
} else if (mfsp->mfs_proc == p) {
mfs_doio(bp, mfsp->mfs_baseoff);
} else {
BUFQ_INSERT_TAIL(&mfsp->mfs_buflist, bp);
@ -316,7 +316,8 @@ mfs_print(v)
} */ *ap = v;
struct mfsnode *mfsp = VTOMFS(ap->a_vp);
printf("tag VT_MFS, pid %d, base %p, size %ld\n", mfsp->mfs_pid,
printf("tag VT_MFS, pid %d, base %p, size %ld\n",
(mfsp->mfs_proc != NULL) ? mfsp->mfs_proc->p_pid : 0,
mfsp->mfs_baseoff, mfsp->mfs_size);
return (0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: mfsnode.h,v 1.7 2000/01/21 23:43:10 thorpej Exp $ */
/* $NetBSD: mfsnode.h,v 1.8 2000/05/16 00:24:08 thorpej Exp $ */
/*
* Copyright (c) 1989, 1993
@ -43,9 +43,8 @@ struct mfsnode {
struct vnode *mfs_vnode; /* vnode associated with this mfsnode */
caddr_t mfs_baseoff; /* base of file system in memory */
long mfs_size; /* size of memory file system */
pid_t mfs_pid; /* supporting process pid */
struct proc *mfs_proc; /* supporting process */
struct buf_queue mfs_buflist; /* list of I/O requests */
long mfs_spare[4];
};
/*