Deleted Added
full compact
nfsstats.h (24330) nfsstats.h (24378)
1/*
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. 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, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
1/*
2 * Copyright (c) 1989, 1993, 1995
3 * The Regents of the University of California. 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, with or without

--- 20 unchanged lines hidden (view full) ---

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
37 * $Id: nfs.h,v 1.22 1997/02/22 09:42:34 peter Exp $
37 * $Id: nfs.h,v 1.23 1997/03/27 20:01:03 guido Exp $
38 */
39
40#ifndef _NFS_NFS_H_
41#define _NFS_NFS_H_
42
43/*
44 * Tunable constants for nfs
45 */
46
38 */
39
40#ifndef _NFS_NFS_H_
41#define _NFS_NFS_H_
42
43/*
44 * Tunable constants for nfs
45 */
46
47#ifdef KERNEL
48
49#define NFS_MAXIOVEC 34
50#define NFS_TICKINTVL 5 /* Desired time for a tick (msec) */
51#define NFS_HZ (hz / nfs_ticks) /* Ticks/sec */
52#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
53#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
54#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
55#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
56#define NFS_MAXREXMIT 100 /* Stop counting after this many */

--- 7 unchanged lines hidden (view full) ---

64#define NFS_MAXATTRTIMO 60
65#endif
66#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */
67#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */
68#define NFS_READDIRSIZE 8192 /* Def. readdir size */
69#define NFS_DEFRAHEAD 1 /* Def. read ahead # blocks */
70#define NFS_MAXRAHEAD 4 /* Max. read ahead # blocks */
71#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */
47#define NFS_MAXIOVEC 34
48#define NFS_TICKINTVL 5 /* Desired time for a tick (msec) */
49#define NFS_HZ (hz / nfs_ticks) /* Ticks/sec */
50#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
51#define NFS_MINTIMEO (1 * NFS_HZ) /* Min timeout to use */
52#define NFS_MAXTIMEO (60 * NFS_HZ) /* Max timeout to backoff to */
53#define NFS_MINIDEMTIMEO (5 * NFS_HZ) /* Min timeout for non-idempotent ops*/
54#define NFS_MAXREXMIT 100 /* Stop counting after this many */

--- 7 unchanged lines hidden (view full) ---

62#define NFS_MAXATTRTIMO 60
63#endif
64#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */
65#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */
66#define NFS_READDIRSIZE 8192 /* Def. readdir size */
67#define NFS_DEFRAHEAD 1 /* Def. read ahead # blocks */
68#define NFS_MAXRAHEAD 4 /* Max. read ahead # blocks */
69#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */
72#define NFS_MAXASYNCDAEMON 20 /* Max. number async_daemons runable */
70#define NFS_MAXASYNCDAEMON 20 /* Max. number async_daemons runnable */
73#define NFS_MAXGATHERDELAY 100 /* Max. write gather delay (msec) */
74#ifndef NFS_GATHERDELAY
75#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
76#endif
77#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
71#define NFS_MAXGATHERDELAY 100 /* Max. write gather delay (msec) */
72#ifndef NFS_GATHERDELAY
73#define NFS_GATHERDELAY 10 /* Default write gather delay (msec) */
74#endif
75#define NFS_DIRBLKSIZ 4096 /* Must be a multiple of DIRBLKSIZ */
76#ifdef KERNEL
77#define DIRBLKSIZ 512 /* XXX we used to use ufs's DIRBLKSIZ */
78#endif
78
79/*
80 * Oddballs
81 */
82#define NMOD(a) ((a) % nfs_asyncdaemons)
83#define NFS_CMPFH(n, f, s) \
84 ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
85#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)

--- 38 unchanged lines hidden (view full) ---

124 * to one that does not allocate space in powers of 2 size, then this all
125 * becomes bunk!)
126 */
127#define NFS_NODEALLOC 256
128#define NFS_MNTALLOC 512
129#define NFS_SVCALLOC 256
130#define NFS_UIDALLOC 128
131
79
80/*
81 * Oddballs
82 */
83#define NMOD(a) ((a) % nfs_asyncdaemons)
84#define NFS_CMPFH(n, f, s) \
85 ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
86#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)

--- 38 unchanged lines hidden (view full) ---

125 * to one that does not allocate space in powers of 2 size, then this all
126 * becomes bunk!)
127 */
128#define NFS_NODEALLOC 256
129#define NFS_MNTALLOC 512
130#define NFS_SVCALLOC 256
131#define NFS_UIDALLOC 128
132
132#endif /* KERNEL */
133
134/*
133/*
135 * NFS mount option flags
136 */
137#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */
138#define NFSMNT_WSIZE 0x00000002 /* set write size */
139#define NFSMNT_RSIZE 0x00000004 /* set read size */
140#define NFSMNT_TIMEO 0x00000008 /* set initial timeout */
141#define NFSMNT_RETRANS 0x00000010 /* set number of request retries */
142#define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */
143#define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */
144#define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */
145#define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */
146#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */
147#define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */
148#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */
149#define NFSMNT_LEASETERM 0x00001000 /* set lease term (nqnfs) */
150#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */
151#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */
152#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */
153#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */
154#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */
155#define NFSMNT_INTERNAL 0xfffc0000 /* Bits set internally */
156#define NFSMNT_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
157#define NFSMNT_GOTPATHCONF 0x00080000 /* Got the V3 pathconf info */
158#define NFSMNT_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
159#define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */
160#define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */
161#define NFSMNT_DISMNT 0x00800000 /* Dismounted */
162#define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */
163#define NFSMNT_WANTSND 0x02000000 /* Want above */
164#define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */
165#define NFSMNT_WANTRCV 0x08000000 /* Want above */
166#define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */
167#define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */
168#define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */
169#define NFSMNT_AUTHERR 0x80000000 /* Authentication error */
170
171/*
172 * Arguments to mount NFS
173 */
174#define NFS_ARGSVERSION 3 /* change when nfs_args changes */
175struct nfs_args {
176 int version; /* args structure version number */
177 struct sockaddr *addr; /* file server address */
178 int addrlen; /* length of address */
179 int sotype; /* Socket type */

--- 494 unchanged lines hidden ---
134 * Arguments to mount NFS
135 */
136#define NFS_ARGSVERSION 3 /* change when nfs_args changes */
137struct nfs_args {
138 int version; /* args structure version number */
139 struct sockaddr *addr; /* file server address */
140 int addrlen; /* length of address */
141 int sotype; /* Socket type */

--- 494 unchanged lines hidden ---