update for 4.4BSD from Rick Macklem
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 3 Feb 1993 06:33:27 +0000 (22:33 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 3 Feb 1993 06:33:27 +0000 (22:33 -0800)
SCCS-vsn: sys/nfs/nfsnode.h 7.32
SCCS-vsn: sys/nfs/nfsrtt.h 7.2

usr/src/sys/nfs/nfsnode.h
usr/src/sys/nfs/nfsrtt.h

index a9e41bc..918173d 100644 (file)
@@ -7,7 +7,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)nfsnode.h   7.31 (Berkeley) %G%
+ *     @(#)nfsnode.h   7.32 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -58,6 +58,7 @@ struct nfsnode {
 /*
  * Flags for n_flag
  */
 /*
  * Flags for n_flag
  */
+#define        NFLUSHWANT      0x0001  /* Want wakeup from a flush in prog. */
 #define        NFLUSHINPROG    0x0002  /* Avoid multiple calls to vinvalbuf() */
 #define        NMODIFIED       0x0004  /* Might have a modified buffer in bio */
 #define        NWRITEERR       0x0008  /* Flag write errors so close will know */
 #define        NFLUSHINPROG    0x0002  /* Avoid multiple calls to vinvalbuf() */
 #define        NMODIFIED       0x0004  /* Might have a modified buffer in bio */
 #define        NWRITEERR       0x0008  /* Flag write errors so close will know */
@@ -68,23 +69,6 @@ struct nfsnode {
 #define        NUPD            0x0200  /* Special file updated */
 #define        NCHG            0x0400  /* Special file times changed */
 
 #define        NUPD            0x0200  /* Special file updated */
 #define        NCHG            0x0400  /* Special file times changed */
 
-#define        NFS_VINVBUF(np, vp, flags, cred, p) {           \
-       if ((np->n_flag & NFLUSHINPROG) == 0) {         \
-               np->n_flag |= NFLUSHINPROG;             \
-               (void) vinvalbuf(vp, flags, cred, p);   \
-               np->n_flag &= ~(NFLUSHINPROG|NMODIFIED);\
-       }                                               \
-}
-
-#define        NFS_VINVBUFE(np, vp, flags, cred, p, error) {   \
-       if ((np->n_flag & NFLUSHINPROG) == 0) {         \
-               np->n_flag |= NFLUSHINPROG;             \
-               error = vinvalbuf(vp, flags, cred, p);  \
-               np->n_flag &= ~(NFLUSHINPROG|NMODIFIED);\
-       } else                                          \
-               error = 0;                              \
-}
-
 /*
  * Convert between nfsnode pointers and vnode pointers
  */
 /*
  * Convert between nfsnode pointers and vnode pointers
  */
@@ -145,5 +129,5 @@ int nfs_valloc __P((struct vop_valloc_args *));
 int    nfs_vfree __P((struct vop_vfree_args *));
 int    nfs_truncate __P((struct vop_truncate_args *));
 int    nfs_update __P((struct vop_update_args *));
 int    nfs_vfree __P((struct vop_vfree_args *));
 int    nfs_truncate __P((struct vop_truncate_args *));
 int    nfs_update __P((struct vop_update_args *));
-int    bwrite();               /* NFS needs a bwrite routine */
+int    nfs_bwrite __P((struct vop_bwrite_args *));
 #endif /* KERNEL */
 #endif /* KERNEL */
index d581960..6a1948d 100644 (file)
@@ -7,24 +7,64 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)nfsrtt.h    7.1 (Berkeley) %G%
+ *     @(#)nfsrtt.h    7.2 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
- * Definitions for client side performance monitor.
+ * Definitions for performance monitor.
+ * The client and server logging are turned on by setting the global
+ * constant "nfsrtton" to 1.
  */
 #define        NFSRTTLOGSIZ    128
  */
 #define        NFSRTTLOGSIZ    128
+
+/*
+ * Circular log of client side rpc activity. Each log entry is for one
+ * rpc filled in upon completion. (ie. in order of completion)
+ * The "pos" is the table index for the "next" entry, therefore the
+ * list goes from nfsrtt.rttl[pos] --> nfsrtt.rttl[pos - 1] in
+ * chronological order of completion.
+ */
 struct nfsrtt {
 struct nfsrtt {
-       int pos;
+       int pos;                        /* Position in array for next entry */
        struct rttl {
        struct rttl {
-               int     proc;
-               int     rtt;
-               int     rto;
-               int     sent;
-               int     cwnd;
-               int     srtt;
-               int     sdrtt;
-               fsid_t  fsid;
-               struct timeval tstamp;
+               int     proc;           /* NFS procedure number */
+               int     rtt;            /* Measured round trip time */
+               int     rto;            /* Round Trip Timeout */
+               int     sent;           /* # rpcs in progress */
+               int     cwnd;           /* Send window */
+               int     srtt;           /* Ave Round Trip Time */
+               int     sdrtt;          /* Ave mean deviation of RTT */
+               fsid_t  fsid;           /* Fsid for mount point */
+               struct timeval tstamp;  /* Timestamp of log entry */
        } rttl[NFSRTTLOGSIZ];
 };
        } rttl[NFSRTTLOGSIZ];
 };
+
+/*
+ * And definitions for server side performance monitor.
+ * The log organization is the same as above except it is filled in at the
+ * time the server sends the rpc reply.
+ */
+
+/*
+ * Bits for the flags field.
+ */
+#define        DRT_NQNFS       0x01    /* Rpc used Nqnfs protocol */
+#define        DRT_TCP         0x02    /* Client used TCP transport */
+#define        DRT_CACHEREPLY  0x04    /* Reply was from recent request cache */
+#define        DRT_CACHEDROP   0x08    /* Rpc request dropped, due to recent reply */
+
+/*
+ * Server log structure
+ * NB: ipadr == INADDR_ANY indicates a client using a non IP protocol.
+ *     (ISO perhaps?)
+ */
+struct nfsdrt {
+       int pos;                        /* Position of next log entry */
+       struct drt {
+               int     flag;           /* Bits as defined above */
+               int     proc;           /* NFS procedure number */
+               u_long  ipadr;          /* IP address of client */
+               int     resptime;       /* Response time (usec) */
+               struct timeval tstamp;  /* Timestamp of log entry */
+       } drt[NFSRTTLOGSIZ];
+};