138414Smckusick /* 238414Smckusick * Copyright (c) 1989 The Regents of the University of California. 338414Smckusick * All rights reserved. 438414Smckusick * 538414Smckusick * This code is derived from software contributed to Berkeley by 638414Smckusick * Rick Macklem at The University of Guelph. 738414Smckusick * 844515Sbostic * %sccs.include.redist.c% 938414Smckusick * 10*54444Smckusick * @(#)nfsmount.h 7.10 (Berkeley) 06/25/92 1138414Smckusick */ 1238414Smckusick 1338414Smckusick /* 1438414Smckusick * Mount structure. 1540122Smckusick * One allocated on every NFS mount. 1640122Smckusick * Holds NFS specific information for mount. 1738414Smckusick */ 1838414Smckusick struct nfsmount { 1938414Smckusick int nm_flag; /* Flags for soft/hard... */ 2040122Smckusick struct mount *nm_mountp; /* Vfs structure for this filesystem */ 2152196Smckusick int nm_numgrps; /* Max. size of groupslist */ 2238414Smckusick nfsv2fh_t nm_fh; /* File handle of root dir */ 2341895Smckusick struct socket *nm_so; /* Rpc socket */ 2441895Smckusick int nm_sotype; /* Type of socket */ 2541895Smckusick int nm_soproto; /* and protocol */ 2641895Smckusick int nm_soflags; /* pr_flags for socket protocol */ 2741895Smckusick struct mbuf *nm_nam; /* Addr of server */ 2852196Smckusick int nm_timeo; /* Init timer for NFSMNT_DUMBTIMR */ 2952196Smckusick int nm_retry; /* Max retries */ 3052196Smckusick int nm_srtt[4]; /* Timers for rpcs */ 3152196Smckusick int nm_sdrtt[4]; 3252196Smckusick int nm_sent; /* Request send count */ 3352196Smckusick int nm_cwnd; /* Request send window */ 3452196Smckusick int nm_timeouts; /* Request timeouts */ 3552196Smckusick int nm_deadthresh; /* Threshold of timeouts-->dead server*/ 3638414Smckusick int nm_rsize; /* Max size of read rpc */ 3738414Smckusick int nm_wsize; /* Max size of write rpc */ 3852196Smckusick int nm_readahead; /* Num. of blocks to readahead */ 3952196Smckusick int nm_leaseterm; /* Term (sec) for NQNFS lease */ 4052196Smckusick struct nfsnode *nm_tnext; /* Head of lease timer queue */ 4152196Smckusick struct nfsnode *nm_tprev; 4252196Smckusick struct vnode *nm_inprog; /* Vnode in prog by nqnfs_clientd() */ 4352196Smckusick uid_t nm_authuid; /* Uid for authenticator */ 4452196Smckusick int nm_authtype; /* Authenticator type */ 4552196Smckusick int nm_authlen; /* and length */ 4652196Smckusick char *nm_authstr; /* Authenticator string */ 4738414Smckusick }; 4838414Smckusick 4941398Smckusick #ifdef KERNEL 5041398Smckusick /* 5141398Smckusick * Convert mount ptr to nfsmount ptr. 5241398Smckusick */ 5341398Smckusick #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 5441398Smckusick #endif /* KERNEL */ 5548045Smckusick 5648045Smckusick /* 5748045Smckusick * Prototypes for NFS mount operations 5848045Smckusick */ 5948045Smckusick int nfs_mount __P(( 6048045Smckusick struct mount *mp, 6148045Smckusick char *path, 6248045Smckusick caddr_t data, 6348045Smckusick struct nameidata *ndp, 6448045Smckusick struct proc *p)); 6548045Smckusick int nfs_start __P(( 6648045Smckusick struct mount *mp, 6748045Smckusick int flags, 6848045Smckusick struct proc *p)); 6948045Smckusick int nfs_unmount __P(( 7048045Smckusick struct mount *mp, 7148045Smckusick int mntflags, 7248045Smckusick struct proc *p)); 7348045Smckusick int nfs_root __P(( 7448045Smckusick struct mount *mp, 7548045Smckusick struct vnode **vpp)); 7648045Smckusick int nfs_quotactl __P(( 7748045Smckusick struct mount *mp, 7848045Smckusick int cmds, 79*54444Smckusick uid_t uid, 8048045Smckusick caddr_t arg, 8148045Smckusick struct proc *p)); 8248045Smckusick int nfs_statfs __P(( 8348045Smckusick struct mount *mp, 8448045Smckusick struct statfs *sbp, 8548045Smckusick struct proc *p)); 8648045Smckusick int nfs_sync __P(( 8748045Smckusick struct mount *mp, 88*54444Smckusick int waitfor, 89*54444Smckusick struct ucred *cred, 90*54444Smckusick struct proc *p)); 9148045Smckusick int nfs_fhtovp __P(( 9248045Smckusick struct mount *mp, 9348045Smckusick struct fid *fhp, 9448045Smckusick struct vnode **vpp)); 9548045Smckusick int nfs_vptofh __P(( 9648045Smckusick struct vnode *vp, 9748045Smckusick struct fid *fhp)); 9848045Smckusick int nfs_init __P(()); 99