move to rev 7; new include location; syntax niggles
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 06:28:52 +0000 (22:28 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Mon, 13 Jul 1992 06:28:52 +0000 (22:28 -0800)
SCCS-vsn: sys/miscfs/umapfs/umap_subr.c 7.1
SCCS-vsn: sys/miscfs/umapfs/umap_vfsops.c 7.1
SCCS-vsn: sys/miscfs/umapfs/umap_vnops.c 7.1

usr/src/sys/miscfs/umapfs/umap_subr.c
usr/src/sys/miscfs/umapfs/umap_vfsops.c
usr/src/sys/miscfs/umapfs/umap_vnops.c

index 4fc2468..47fff57 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)lofs_subr.c 1.2 (Berkeley) 6/18/92
+ *     @(#)umap_subr.c 7.1 (Berkeley) %G%
  *
  * $Id: lofs_subr.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp $
  */
  *
  * $Id: lofs_subr.c,v 1.11 1992/05/30 10:05:43 jsp Exp jsp $
  */
@@ -21,7 +21,7 @@
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
 #include <sys/mount.h>
 #include <sys/namei.h>
 #include <sys/malloc.h>
-#include <umapfs/umap.h>
+#include <miscfs/umapfs/umap.h>
 
 #define LOG2_SIZEVNODE 7               /* log2(sizeof struct vnode) */
 #define        NUMAPNODECACHE 16
 
 #define LOG2_SIZEVNODE 7               /* log2(sizeof struct vnode) */
 #define        NUMAPNODECACHE 16
@@ -66,6 +66,7 @@ static struct umap_node_cache *
 umap_node_hash(targetvp)
 struct vnode *targetvp;
 {
 umap_node_hash(targetvp)
 struct vnode *targetvp;
 {
+
        return (&umap_node_cache[UMAP_NHASH(targetvp)]);
 }
 
        return (&umap_node_cache[UMAP_NHASH(targetvp)]);
 }
 
@@ -95,7 +96,8 @@ umap_node_find(mp, targetvp)
 
  loop:
        for (a = hd->ac_forw; a != (struct umap_node *) hd; a = a->umap_forw) {
 
  loop:
        for (a = hd->ac_forw; a != (struct umap_node *) hd; a = a->umap_forw) {
-               if (a->umap_lowervp == targetvp && a->umap_vnode->v_mount == mp) {
+               if (a->umap_lowervp == targetvp &&
+                   a->umap_vnode->v_mount == mp) {
                        vp = UMAPTOV(a);
                        /*
                         * We need vget for the VXLOCK
                        vp = UMAPTOV(a);
                        /*
                         * We need vget for the VXLOCK
@@ -105,7 +107,7 @@ umap_node_find(mp, targetvp)
                        if (vget_nolock(vp)) {
                                printf ("null_node_find: vget failed.\n");
                                goto loop;
                        if (vget_nolock(vp)) {
                                printf ("null_node_find: vget failed.\n");
                                goto loop;
-                       };
+                       }
                        return (vp);
                }
        }
                        return (vp);
                }
        }
@@ -137,7 +139,8 @@ umap_node_alloc(mp, lowervp, vpp)
                return (error); /* XXX: VT_UMAP above */
        vp = *vpp;
 
                return (error); /* XXX: VT_UMAP above */
        vp = *vpp;
 
-       MALLOC(xp, struct umap_node *, sizeof(struct umap_node), M_TEMP, M_WAITOK);
+       MALLOC(xp, struct umap_node *, sizeof(struct umap_node),
+           M_TEMP, M_WAITOK);
        vp->v_type = lowervp->v_type;
        xp->umap_vnode = vp;
        vp->v_data = xp;
        vp->v_type = lowervp->v_type;
        xp->umap_vnode = vp;
        vp->v_data = xp;
@@ -152,12 +155,12 @@ umap_node_alloc(mp, lowervp, vpp)
                vp->v_type = VBAD;      /* node is discarded */
                vp->v_usecount = 0;     /* XXX */
                *vpp = othervp;
                vp->v_type = VBAD;      /* node is discarded */
                vp->v_usecount = 0;     /* XXX */
                *vpp = othervp;
-               return 0;
-       };
+               return (0);
+       }
        VREF(lowervp);   /* Extra VREF will be vrele'd in umap_node_create */
        hd = umap_node_hash(lowervp);
        insque(xp, hd);
        VREF(lowervp);   /* Extra VREF will be vrele'd in umap_node_create */
        hd = umap_node_hash(lowervp);
        insque(xp, hd);
-       return 0;
+       return (0);
 }
 
 
 }
 
 
@@ -195,7 +198,7 @@ umap_node_create(mp, targetvp, newvpp)
                 * Make new vnode reference the umap_node.
                 */
                if (error = umap_node_alloc(mp, targetvp, &aliasvp))
                 * Make new vnode reference the umap_node.
                 */
                if (error = umap_node_alloc(mp, targetvp, &aliasvp))
-                       return error;
+                       return (error);
 
                /*
                 * aliasvp is already VREF'd by getnewvnode()
 
                /*
                 * aliasvp is already VREF'd by getnewvnode()
@@ -212,6 +215,7 @@ umap_node_create(mp, targetvp, newvpp)
        *newvpp = aliasvp;
        return (0);
 }
        *newvpp = aliasvp;
        return (0);
 }
+
 #ifdef UMAPFS_DIAGNOSTIC
 int umap_checkvp_barrier = 1;
 struct vnode *
 #ifdef UMAPFS_DIAGNOSTIC
 int umap_checkvp_barrier = 1;
 struct vnode *
@@ -230,7 +234,7 @@ umap_checkvp(vp, fil, lno)
                printf ("umap_checkvp: on non-umap-node\n");
                while (umap_checkvp_barrier) /*WAIT*/ ;
                panic("umap_checkvp");
                printf ("umap_checkvp: on non-umap-node\n");
                while (umap_checkvp_barrier) /*WAIT*/ ;
                panic("umap_checkvp");
-       };
+       }
 #endif
        if (a->umap_lowervp == NULL) {
                /* Should never happen */
 #endif
        if (a->umap_lowervp == NULL) {
                /* Should never happen */
@@ -252,14 +256,14 @@ umap_checkvp(vp, fil, lno)
                /* wait for debugger */
                while (umap_checkvp_barrier) /*WAIT*/ ;
                panic ("umap with unref'ed lowervp");
                /* wait for debugger */
                while (umap_checkvp_barrier) /*WAIT*/ ;
                panic ("umap with unref'ed lowervp");
-       };
+       }
 #if 0
        printf("umap %x/%d -> %x/%d [%s, %d]\n",
                a->umap_vnode, a->umap_vnode->v_usecount,
                a->umap_lowervp, a->umap_lowervp->v_usecount,
                fil, lno);
 #endif
 #if 0
        printf("umap %x/%d -> %x/%d [%s, %d]\n",
                a->umap_vnode, a->umap_vnode->v_usecount,
                a->umap_lowervp, a->umap_lowervp->v_usecount,
                fil, lno);
 #endif
-       return a->umap_lowervp;
+       return (a->umap_lowervp);
 }
 #endif
 
 }
 #endif
 
@@ -358,4 +362,3 @@ umap_reverse_findid(id,map,nentries)
                return (-1);
 
 }
                return (-1);
 
 }
-
index 9031e5e..4820b5d 100644 (file)
@@ -8,7 +8,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)umap_vfsops.c       1.2 (Berkeley) %G%
+ *     @(#)umap_vfsops.c       7.1 (Berkeley) %G%
  *
  * @(#)null_vfsops.c       1.5 (Berkeley) 7/10/92
  */
  *
  * @(#)null_vfsops.c       1.5 (Berkeley) 7/10/92
  */
@@ -216,7 +216,7 @@ umapfs_unmount(mp, mntflags, p)
         * ever get anything cached at this level at the
         * moment, but who knows...
         */
         * ever get anything cached at this level at the
         * moment, but who knows...
         */
-#if 0
+#ifdef notyet
        mntflushbuf(mp, 0); 
        if (mntinvalbuf(mp, 1))
                return (EBUSY);
        mntflushbuf(mp, 0); 
        if (mntinvalbuf(mp, 1))
                return (EBUSY);
index cb81ee1..77b702d 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)umap_vnops.c        1.2 (Berkeley) %G%
+ *     @(#)umap_vnops.c        7.1 (Berkeley) %G%
  *
  * @(#)umap_vnops.c       1.5 (Berkeley) 7/10/92
  */
  *
  * @(#)umap_vnops.c       1.5 (Berkeley) 7/10/92
  */