convert vnode freelist, mount point list, and clean and dirty buffer lists
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 14 Dec 1993 15:44:20 +0000 (07:44 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Tue, 14 Dec 1993 15:44:20 +0000 (07:44 -0800)
to use the <sys/queue.h> macros

SCCS-vsn: sys/sys/vnode.h 8.3

usr/src/sys/sys/vnode.h

index e03cee2..9b84295 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)vnode.h     8.2 (Berkeley) %G%
+ *     @(#)vnode.h     8.3 (Berkeley) %G%
  */
 
 #include <sys/queue.h>
  */
 
 #include <sys/queue.h>
@@ -29,8 +29,10 @@ enum vtagtype        { VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_LFS };
 
 /*
  * Each underlying filesystem allocates its own private area and hangs
 
 /*
  * Each underlying filesystem allocates its own private area and hangs
- * it from v_data.  If non-null, this area is free in getnewvnode().
+ * it from v_data.  If non-null, this area is freed in getnewvnode().
  */
  */
+LIST_HEAD(buflists, buf);
+
 struct vnode {
        u_long  v_flag;                         /* vnode flags (see below) */
        short   v_usecount;                     /* reference count of users */
 struct vnode {
        u_long  v_flag;                         /* vnode flags (see below) */
        short   v_usecount;                     /* reference count of users */
@@ -40,12 +42,10 @@ struct vnode {
        u_long  v_id;                           /* capability identifier */
        struct  mount *v_mount;                 /* ptr to vfs we are in */
        int     (**v_op)();                     /* vnode operations vector */
        u_long  v_id;                           /* capability identifier */
        struct  mount *v_mount;                 /* ptr to vfs we are in */
        int     (**v_op)();                     /* vnode operations vector */
-       struct  vnode *v_freef;                 /* vnode freelist forward */
-       struct  vnode **v_freeb;                /* vnode freelist back */
-       struct  vnode *v_mountf;                /* vnode mountlist forward */
-       struct  vnode **v_mountb;               /* vnode mountlist back */
-       struct  list_entry v_cleanblkhd;        /* clean blocklist head */
-       struct  list_entry v_dirtyblkhd;        /* dirty blocklist head */
+       TAILQ_ENTRY(vnode) v_freelist;          /* vnode freelist */
+       LIST_ENTRY(vnode) v_mntvnodes;          /* vnodes for mount point */
+       struct  buflists v_cleanblkhd;          /* clean blocklist head */
+       struct  buflists v_dirtyblkhd;          /* dirty blocklist head */
        long    v_numoutput;                    /* num of writes in progress */
        enum    vtype v_type;                   /* vnode type */
        union {
        long    v_numoutput;                    /* num of writes in progress */
        enum    vtype v_type;                   /* vnode type */
        union {