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 | * | |
8 | * Redistribution and use in source and binary forms are permitted | |
9 | * provided that the above copyright notice and this paragraph are | |
10 | * duplicated in all such forms and that any documentation, | |
11 | * advertising materials, and other materials related to such | |
12 | * distribution and use acknowledge that the software was developed | |
13 | * by the University of California, Berkeley. The name of the | |
14 | * University may not be used to endorse or promote products derived | |
15 | * from this software without specific prior written permission. | |
16 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
17 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
19 | * | |
979d1874 | 20 | * @(#)nfsmount.h 7.3 (Berkeley) %G% |
a2907882 KM |
21 | */ |
22 | ||
23 | /* | |
24 | * Mount structure. | |
ecfaf81a KM |
25 | * One allocated on every NFS mount. |
26 | * Holds NFS specific information for mount. | |
a2907882 KM |
27 | */ |
28 | struct nfsmount { | |
29 | int nm_flag; /* Flags for soft/hard... */ | |
ecfaf81a | 30 | struct mount *nm_mountp; /* Vfs structure for this filesystem */ |
a2907882 | 31 | nfsv2fh_t nm_fh; /* File handle of root dir */ |
ecfaf81a KM |
32 | struct socket *nm_so; /* Rpc socket */ |
33 | struct nfshost *nm_hostinfo; /* Host and congestion information */ | |
34 | short nm_retry; /* Max retry count */ | |
35 | short nm_rexmit; /* Rexmit on previous request */ | |
36 | short nm_rtt; /* Round trip timer ticks @ NFS_HZ */ | |
37 | short nm_rto; /* Current timeout */ | |
38 | short nm_srtt; /* Smoothed round trip time */ | |
39 | short nm_rttvar; /* RTT variance */ | |
a2907882 KM |
40 | int nm_rsize; /* Max size of read rpc */ |
41 | int nm_wsize; /* Max size of write rpc */ | |
ecfaf81a KM |
42 | }; |
43 | ||
44 | /* | |
45 | * Hostinfo/congestion structure. | |
46 | * One allocated per NFS server. | |
47 | * Holds host address, congestion limits, request count, etc. | |
48 | * Reference count is of nfsmounts which point to it. | |
49 | */ | |
50 | struct nfshost { | |
51 | struct nfshost *nh_next, *nh_prev; | |
52 | short nh_refcnt; /* Reference count */ | |
53 | short nh_currto; /* Current rto of any nfsmount */ | |
54 | short nh_currexmit; /* Max rexmit count of nfsmounts */ | |
55 | short nh_sent; /* Request send count */ | |
56 | short nh_window; /* Request send window (max) */ | |
57 | short nh_winext; /* Window incremental value */ | |
58 | short nh_ssthresh; /* Slowstart threshold */ | |
59 | short nh_salen; /* Actual length of nh_sockaddr */ | |
60 | struct mbuf *nh_sockaddr; /* Address of server */ | |
a2907882 KM |
61 | }; |
62 | ||
63 | struct nfsmount *vfs_to_nfs(); |