1 /* 2 * Copyright (c) 1989 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)nfsmount.h 7.7 (Berkeley) 04/16/91 11 */ 12 13 /* 14 * Mount structure. 15 * One allocated on every NFS mount. 16 * Holds NFS specific information for mount. 17 */ 18 struct nfsmount { 19 int nm_flag; /* Flags for soft/hard... */ 20 struct mount *nm_mountp; /* Vfs structure for this filesystem */ 21 nfsv2fh_t nm_fh; /* File handle of root dir */ 22 struct socket *nm_so; /* Rpc socket */ 23 int nm_sotype; /* Type of socket */ 24 int nm_soproto; /* and protocol */ 25 int nm_soflags; /* pr_flags for socket protocol */ 26 struct mbuf *nm_nam; /* Addr of server */ 27 short nm_retry; /* Max retry count */ 28 short nm_rexmit; /* Rexmit on previous request */ 29 short nm_rtt; /* Round trip timer ticks @ NFS_HZ */ 30 short nm_rto; /* Current timeout */ 31 short nm_srtt; /* Smoothed round trip time */ 32 short nm_rttvar; /* RTT variance */ 33 short nm_currto; /* Current rto of any nfsmount */ 34 short nm_currexmit; /* Max rexmit count of nfsmounts */ 35 short nm_sent; /* Request send count */ 36 short nm_window; /* Request send window (max) */ 37 short nm_winext; /* Window incremental value */ 38 short nm_ssthresh; /* Slowstart threshold */ 39 short nm_salen; /* Actual length of nm_sockaddr */ 40 int nm_rsize; /* Max size of read rpc */ 41 int nm_wsize; /* Max size of write rpc */ 42 }; 43 44 #ifdef KERNEL 45 /* 46 * Convert mount ptr to nfsmount ptr. 47 */ 48 #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 49 #endif /* KERNEL */ 50 51 /* 52 * Prototypes for NFS mount operations 53 */ 54 int nfs_mount __P(( 55 struct mount *mp, 56 char *path, 57 caddr_t data, 58 struct nameidata *ndp, 59 struct proc *p)); 60 int nfs_start __P(( 61 struct mount *mp, 62 int flags, 63 struct proc *p)); 64 int nfs_unmount __P(( 65 struct mount *mp, 66 int mntflags, 67 struct proc *p)); 68 int nfs_root __P(( 69 struct mount *mp, 70 struct vnode **vpp)); 71 int nfs_quotactl __P(( 72 struct mount *mp, 73 int cmds, 74 int uid, /* should be uid_t */ 75 caddr_t arg, 76 struct proc *p)); 77 int nfs_statfs __P(( 78 struct mount *mp, 79 struct statfs *sbp, 80 struct proc *p)); 81 int nfs_sync __P(( 82 struct mount *mp, 83 int waitfor)); 84 int nfs_fhtovp __P(( 85 struct mount *mp, 86 struct fid *fhp, 87 struct vnode **vpp)); 88 int nfs_vptofh __P(( 89 struct vnode *vp, 90 struct fid *fhp)); 91 int nfs_init __P(()); 92