"December update from Rick Macklem"
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 21 Dec 1989 04:31:10 +0000 (20:31 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 21 Dec 1989 04:31:10 +0000 (20:31 -0800)
SCCS-vsn: sys/nfs/nfs.h 7.4
SCCS-vsn: sys/nfs/nfsm_subs.h 7.5
SCCS-vsn: sys/nfs/nfsproto.h 7.3
SCCS-vsn: sys/nfs/rpcv2.h 7.2
SCCS-vsn: sys/nfs/xdr_subs.h 7.2

usr/src/sys/nfs/nfs.h
usr/src/sys/nfs/nfsm_subs.h
usr/src/sys/nfs/nfsproto.h
usr/src/sys/nfs/rpcv2.h
usr/src/sys/nfs/xdr_subs.h

index 9cff4df..ca31b9e 100644 (file)
@@ -17,7 +17,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)nfs.h       7.3 (Berkeley) %G%
+ *     @(#)nfs.h       7.4 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -74,11 +74,21 @@ struct nfsstats {
        int     attrcache_misses;
        int     lookupcache_hits;
        int     lookupcache_misses;
        int     attrcache_misses;
        int     lookupcache_hits;
        int     lookupcache_misses;
+       int     biocache_reads;
+       int     read_bios;
+       int     read_physios;
+       int     biocache_writes;
+       int     write_bios;
+       int     write_physios;
        int     rpccnt[NFS_NPROCS];
        int     rpcretries;
        int     srvrpccnt[NFS_NPROCS];
        int     srvrpc_errs;
        int     srv_errs;
        int     rpccnt[NFS_NPROCS];
        int     rpcretries;
        int     srvrpccnt[NFS_NPROCS];
        int     srvrpc_errs;
        int     srv_errs;
+       int     srvcache_inproghits;
+       int     srvcache_idemdonehits;
+       int     srvcache_nonidemdonehits;
+       int     srvcache_misses;
 };
 
 #ifdef KERNEL
 };
 
 #ifdef KERNEL
index 65c450e..1ab5f8e 100644 (file)
@@ -17,7 +17,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)nfsm_subs.h 7.4 (Berkeley) %G%
+ *     @(#)nfsm_subs.h 7.5 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -160,7 +160,6 @@ extern struct vnode *nfs_fhtovp();
                } \
                (v) = NFSTOV(np); \
                nfsm_loadattr(v, (struct vattr *)0); \
                } \
                (v) = NFSTOV(np); \
                nfsm_loadattr(v, (struct vattr *)0); \
-               (v)->v_type = np->n_vattr.va_type; \
                }
 
 #define        nfsm_loadattr(v,a) \
                }
 
 #define        nfsm_loadattr(v,a) \
@@ -242,16 +241,34 @@ extern struct vnode *nfs_fhtovp();
                nfsmout: \
                return(error)
 
                nfsmout: \
                return(error)
 
+#ifndef lint
+#define        nfsm_reply(s) \
+               { \
+               *repstat = error; \
+               if (error) \
+                       nfs_rephead(0, xid, error, mrq, &mb, &bpos); \
+               else \
+                       nfs_rephead((s), xid, error, mrq, &mb, &bpos); \
+               m_freem(mrep); \
+               mreq = *mrq; \
+               if (error) \
+                       return(0); \
+               }
+#else  /* lint */
 #define        nfsm_reply(s) \
                { \
 #define        nfsm_reply(s) \
                { \
+               *repstat = error; \
                if (error) \
                        nfs_rephead(0, xid, error, mrq, &mb, &bpos); \
                else \
                        nfs_rephead((s), xid, error, mrq, &mb, &bpos); \
                m_freem(mrep); \
                if (error) \
                        nfs_rephead(0, xid, error, mrq, &mb, &bpos); \
                else \
                        nfs_rephead((s), xid, error, mrq, &mb, &bpos); \
                m_freem(mrep); \
+               mreq = *mrq; \
+               mrep = mreq; \
                if (error) \
                        return(0); \
                }
                if (error) \
                        return(0); \
                }
+#endif /* lint */
 
 #define        nfsm_adv(s) \
                t1 = mtod(md, caddr_t)+md->m_len-dpos; \
 
 #define        nfsm_adv(s) \
                t1 = mtod(md, caddr_t)+md->m_len-dpos; \
@@ -282,3 +299,21 @@ extern struct vnode *nfs_fhtovp();
                } \
                p = (u_long *)bp
 
                } \
                p = (u_long *)bp
 
+#define        nfsm_srvfillattr \
+       fp->fa_type = vtonfs_type(vap->va_type); \
+       fp->fa_mode = vtonfs_mode(vap->va_type, vap->va_mode); \
+       fp->fa_nlink = txdr_unsigned(vap->va_nlink); \
+       fp->fa_uid = txdr_unsigned(vap->va_uid); \
+       fp->fa_gid = txdr_unsigned(vap->va_gid); \
+       fp->fa_size = txdr_unsigned(vap->va_size); \
+       fp->fa_blocksize = txdr_unsigned(vap->va_blocksize); \
+       fp->fa_rdev = txdr_unsigned(vap->va_rdev); \
+       fp->fa_blocks = txdr_unsigned(vap->va_bytes / vap->va_blocksize); \
+       fp->fa_fsid = txdr_unsigned(vap->va_fsid); \
+       fp->fa_fileid = txdr_unsigned(vap->va_fileid); \
+       fp->fa_atime.tv_sec = txdr_unsigned(vap->va_atime.tv_sec); \
+       fp->fa_atime.tv_usec = txdr_unsigned(vap->va_flags); \
+       txdr_time(&vap->va_mtime, &fp->fa_mtime); \
+       fp->fa_ctime.tv_sec = txdr_unsigned(vap->va_ctime.tv_sec); \
+       fp->fa_ctime.tv_usec = txdr_unsigned(vap->va_gen)
+
index b12e42b..16811c9 100644 (file)
@@ -17,7 +17,7 @@
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  *
- *     @(#)nfsproto.h  7.2 (Berkeley) %G%
+ *     @(#)nfsproto.h  7.3 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -26,8 +26,7 @@
 
 /*
  * Constants as defined in the Sun NFS Version 2 spec.
 
 /*
  * Constants as defined in the Sun NFS Version 2 spec.
- * "Network File System Protocol Specification" in the
- * Manual "Networking on the Sun Workstation", Part #800-1324-03, Rev B
+ * "NFS: Network File System Protocol Specification" RFC1094
  */
 
 #define NFS_PORT       2049
  */
 
 #define NFS_PORT       2049
index ed05667..b99eca9 100644 (file)
@@ -22,8 +22,7 @@
 
 /*
  * Definitions for Sun RPC Version 2, from
 
 /*
  * Definitions for Sun RPC Version 2, from
- * "Remote Procedure Call Protocol Specification" in the manual
- * "Networking on the Sun Workstation", Part #800-1324-03 Rev. B
+ * "RPC: Remote Procedure Call Protocol Specification" RFC1057
  */
 
 /* Version # */
  */
 
 /* Version # */
index 7c8b738..4cb383f 100644 (file)
@@ -23,6 +23,7 @@
 /*
  * Macros used for conversion to/from xdr representation by nfs...
  * These use the MACHINE DEPENDENT routines ntohl, htonl
 /*
  * Macros used for conversion to/from xdr representation by nfs...
  * These use the MACHINE DEPENDENT routines ntohl, htonl
+ * As defined by "XDR: External Data Representation Standard" RFC1014
  */
 /* From xdr to machine */
 #define fxdr_unsigned(t, v)    ((t)ntohl((long)(v)))
  */
 /* From xdr to machine */
 #define fxdr_unsigned(t, v)    ((t)ntohl((long)(v)))