Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/mfs Record the proc directly, not the pid, of the MF...



details:   https://anonhg.NetBSD.org/src/rev/5f41fb727ef1
branches:  trunk
changeset: 486229:5f41fb727ef1
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue May 16 00:24:08 2000 +0000

description:
Record the proc directly, not the pid, of the MFS server process,
and nuke the spare fields in the mfsnode.

diffstat:

 sys/ufs/mfs/mfs_vfsops.c |  6 +++---
 sys/ufs/mfs/mfs_vnops.c  |  9 +++++----
 sys/ufs/mfs/mfsnode.h    |  5 ++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (84 lines):

diff -r 4fa526107055 -r 5f41fb727ef1 sys/ufs/mfs/mfs_vfsops.c
--- a/sys/ufs/mfs/mfs_vfsops.c  Tue May 16 00:18:44 2000 +0000
+++ b/sys/ufs/mfs/mfs_vfsops.c  Tue May 16 00:24:08 2000 +0000
@@ -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 @@
        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 @@
        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;
diff -r 4fa526107055 -r 5f41fb727ef1 sys/ufs/mfs/mfs_vnops.c
--- a/sys/ufs/mfs/mfs_vnops.c   Tue May 16 00:18:44 2000 +0000
+++ b/sys/ufs/mfs/mfs_vnops.c   Tue May 16 00:24:08 2000 +0000
@@ -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 @@
                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 @@
                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 @@
        } */ *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);
 }
diff -r 4fa526107055 -r 5f41fb727ef1 sys/ufs/mfs/mfsnode.h
--- a/sys/ufs/mfs/mfsnode.h     Tue May 16 00:18:44 2000 +0000
+++ b/sys/ufs/mfs/mfsnode.h     Tue May 16 00:24:08 2000 +0000
@@ -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  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];
 };
 
 /*



Home | Main Index | Thread Index | Old Index