Commit | Line | Data |
---|---|---|
a2907882 KM |
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 | * | |
dbf0c423 | 8 | * %sccs.include.redist.c% |
a2907882 | 9 | * |
e0f6df7b | 10 | * @(#)nfsmount.h 7.8 (Berkeley) %G% |
a2907882 KM |
11 | */ |
12 | ||
13 | /* | |
14 | * Mount structure. | |
ecfaf81a KM |
15 | * One allocated on every NFS mount. |
16 | * Holds NFS specific information for mount. | |
a2907882 KM |
17 | */ |
18 | struct nfsmount { | |
19 | int nm_flag; /* Flags for soft/hard... */ | |
ecfaf81a | 20 | struct mount *nm_mountp; /* Vfs structure for this filesystem */ |
a2907882 | 21 | nfsv2fh_t nm_fh; /* File handle of root dir */ |
f0f1cbaa KM |
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 */ | |
ecfaf81a KM |
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 */ | |
f0f1cbaa KM |
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 */ | |
a2907882 KM |
40 | int nm_rsize; /* Max size of read rpc */ |
41 | int nm_wsize; /* Max size of write rpc */ | |
ecfaf81a KM |
42 | }; |
43 | ||
54fb9dc2 KM |
44 | #ifdef KERNEL |
45 | /* | |
46 | * Convert mount ptr to nfsmount ptr. | |
47 | */ | |
48 | #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) | |
49 | #endif /* KERNEL */ | |
4dbea688 KM |
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, | |
e0f6df7b | 74 | u_int uid, /* should be uid_t */ |
4dbea688 KM |
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(()); |