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 * 838414Smckusick * Redistribution and use in source and binary forms are permitted 938414Smckusick * provided that the above copyright notice and this paragraph are 1038414Smckusick * duplicated in all such forms and that any documentation, 1138414Smckusick * advertising materials, and other materials related to such 1238414Smckusick * distribution and use acknowledge that the software was developed 1338414Smckusick * by the University of California, Berkeley. The name of the 1438414Smckusick * University may not be used to endorse or promote products derived 1538414Smckusick * from this software without specific prior written permission. 1638414Smckusick * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1738414Smckusick * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1838414Smckusick * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1938414Smckusick * 20*41398Smckusick * @(#)nfsmount.h 7.4 (Berkeley) 05/04/90 2138414Smckusick */ 2238414Smckusick 2338414Smckusick /* 2438414Smckusick * Mount structure. 2540122Smckusick * One allocated on every NFS mount. 2640122Smckusick * Holds NFS specific information for mount. 2738414Smckusick */ 2838414Smckusick struct nfsmount { 2938414Smckusick int nm_flag; /* Flags for soft/hard... */ 3040122Smckusick struct mount *nm_mountp; /* Vfs structure for this filesystem */ 3138414Smckusick nfsv2fh_t nm_fh; /* File handle of root dir */ 3240122Smckusick struct socket *nm_so; /* Rpc socket */ 3340122Smckusick struct nfshost *nm_hostinfo; /* Host and congestion information */ 3440122Smckusick short nm_retry; /* Max retry count */ 3540122Smckusick short nm_rexmit; /* Rexmit on previous request */ 3640122Smckusick short nm_rtt; /* Round trip timer ticks @ NFS_HZ */ 3740122Smckusick short nm_rto; /* Current timeout */ 3840122Smckusick short nm_srtt; /* Smoothed round trip time */ 3940122Smckusick short nm_rttvar; /* RTT variance */ 4038414Smckusick int nm_rsize; /* Max size of read rpc */ 4138414Smckusick int nm_wsize; /* Max size of write rpc */ 4238414Smckusick }; 4338414Smckusick 4440122Smckusick /* 4540122Smckusick * Hostinfo/congestion structure. 4640122Smckusick * One allocated per NFS server. 4740122Smckusick * Holds host address, congestion limits, request count, etc. 4840122Smckusick * Reference count is of nfsmounts which point to it. 4940122Smckusick */ 5040122Smckusick struct nfshost { 5140122Smckusick struct nfshost *nh_next, *nh_prev; 5240122Smckusick short nh_refcnt; /* Reference count */ 5340122Smckusick short nh_currto; /* Current rto of any nfsmount */ 5440122Smckusick short nh_currexmit; /* Max rexmit count of nfsmounts */ 5540122Smckusick short nh_sent; /* Request send count */ 5640122Smckusick short nh_window; /* Request send window (max) */ 5740122Smckusick short nh_winext; /* Window incremental value */ 5840122Smckusick short nh_ssthresh; /* Slowstart threshold */ 5940122Smckusick short nh_salen; /* Actual length of nh_sockaddr */ 6040122Smckusick struct mbuf *nh_sockaddr; /* Address of server */ 6140122Smckusick }; 6240122Smckusick 63*41398Smckusick #ifdef KERNEL 64*41398Smckusick /* 65*41398Smckusick * Convert mount ptr to nfsmount ptr. 66*41398Smckusick */ 67*41398Smckusick #define VFSTONFS(mp) ((struct nfsmount *)((mp)->mnt_data)) 68*41398Smckusick #endif /* KERNEL */ 69