BSD 4_4_Lite1 release
[unix-history] / usr / src / sys / sys / vnode.h
index a848860..fa51d99 100644 (file)
@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     @(#)vnode.h     8.1 (Berkeley) 6/2/93
+ *     @(#)vnode.h     8.7 (Berkeley) 2/4/94
  */
 
 #include <sys/queue.h>
  */
 
 #include <sys/queue.h>
@@ -51,12 +51,18 @@ enum vtype  { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD };
  * These are for the benefit of external programs only (e.g., pstat)
  * and should NEVER be inspected by the kernel.
  */
  * These are for the benefit of external programs only (e.g., pstat)
  * and should NEVER be inspected by the kernel.
  */
-enum vtagtype  { VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_LFS };
+enum vtagtype  {
+       VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_PC, VT_LFS, VT_LOFS, VT_FDESC,
+       VT_PORTAL, VT_NULL, VT_UMAP, VT_KERNFS, VT_PROCFS, VT_AFS, VT_ISOFS,
+       VT_UNION
+};
 
 /*
  * 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 */
@@ -66,12 +72,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 {
@@ -87,7 +91,8 @@ struct vnode {
        daddr_t v_lasta;                        /* last allocation */
        int     v_clen;                         /* length of current cluster */
        int     v_ralen;                        /* Read-ahead length */
        daddr_t v_lasta;                        /* last allocation */
        int     v_clen;                         /* length of current cluster */
        int     v_ralen;                        /* Read-ahead length */
-       long    v_spare[8];                     /* round to 128 bytes */
+       daddr_t v_maxra;                        /* last readahead block */
+       long    v_spare[7];                     /* round to 128 bytes */
        enum    vtagtype v_tag;                 /* type of underlying data */
        void    *v_data;                        /* private data for fs */
 };
        enum    vtagtype v_tag;                 /* type of underlying data */
        void    *v_data;                        /* private data for fs */
 };
@@ -207,7 +212,7 @@ void        vref __P((struct vnode *));
 /*
  * Global vnode data.
  */
 /*
  * Global vnode data.
  */
-extern struct vnode *rootdir;          /* root (i.e. "/") vnode */
+extern struct vnode *rootvnode;        /* root (i.e. "/") vnode */
 extern int desiredvnodes;              /* number of vnodes desired */
 extern struct vattr va_null;           /* predefined null vattr structure */
 
 extern int desiredvnodes;              /* number of vnodes desired */
 extern struct vattr va_null;           /* predefined null vattr structure */
 
@@ -368,7 +373,7 @@ int vinvalbuf __P((struct vnode *vp, int save, struct ucred *cred,
            struct proc *p, int slpflag, int slptimeo));
 void   vattr_null __P((struct vattr *vap));
 int    vcount __P((struct vnode *vp));
            struct proc *p, int slpflag, int slptimeo));
 void   vattr_null __P((struct vattr *vap));
 int    vcount __P((struct vnode *vp));
-int    vget __P((struct vnode *vp));
+int    vget __P((struct vnode *vp, int lockflag));
 void   vgone __P((struct vnode *vp));
 void   vgoneall __P((struct vnode *vp));
 int    vn_bwrite __P((struct vop_bwrite_args *ap));
 void   vgone __P((struct vnode *vp));
 void   vgoneall __P((struct vnode *vp));
 int    vn_bwrite __P((struct vop_bwrite_args *ap));