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.34 1998/03/30 09:53:43 phk Exp $ |
38 */ 39 40#ifndef _NFS_NFS_H_ 41#define _NFS_NFS_H_ 42 43/* 44 * Tunable constants for nfs 45 */ --- 5 unchanged lines hidden (view full) --- 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 */ 55#define NFS_MAXWINDOW 1024 /* Max number of outstanding requests */ 56#define NFS_RETRANS 10 /* Num of retrans for soft mounts */ 57#define NFS_MAXGRPS 16 /* Max. size of groups list */ 58#ifndef NFS_MINATTRTIMO |
59#define NFS_MINATTRTIMO 3 /* VREG attrib cache timeout in sec */ |
60#endif 61#ifndef NFS_MAXATTRTIMO 62#define NFS_MAXATTRTIMO 60 63#endif |
64#ifndef NFS_MINDIRATTRTIMO 65#define NFS_MINDIRATTRTIMO 30 /* VDIR attrib cache timeout in sec */ 66#endif 67#ifndef NFS_MAXDIRATTRTIMO 68#define NFS_MAXDIRATTRTIMO 60 69#endif |
70#define NFS_WSIZE 8192 /* Def. write data size <= 8192 */ 71#define NFS_RSIZE 8192 /* Def. read data size <= 8192 */ 72#define NFS_READDIRSIZE 8192 /* Def. readdir size */ 73#define NFS_DEFRAHEAD 1 /* Def. read ahead # blocks */ 74#define NFS_MAXRAHEAD 4 /* Max. read ahead # blocks */ 75#define NFS_MAXUIDHASH 64 /* Max. # of hashed uid entries/mp */ 76#define NFS_MAXASYNCDAEMON 20 /* Max. number async_daemons runnable */ 77#define NFS_MAXGATHERDELAY 100 /* Max. write gather delay (msec) */ --- 27 unchanged lines hidden (view full) --- 105 * The IO_METASYNC flag should be implemented for local file systems. 106 * (Until then, it is nothin at all.) 107 */ 108#ifndef IO_METASYNC 109#define IO_METASYNC 0 110#endif 111 112/* |
113 * Expected allocation sizes for major data structures. If the actual size 114 * of the structure exceeds these sizes, then malloc() will be allocating 115 * almost twice the memory required. This is used in nfs_init() to warn 116 * the sysadmin that the size of a structure should be reduced. 117 * (These sizes are always a power of 2. If the kernel malloc() changes 118 * to one that does not allocate space in powers of 2 size, then this all 119 * becomes bunk!) 120 */ --- 20 unchanged lines hidden (view full) --- 141 int readdirsize; /* readdir size in bytes */ 142 int timeo; /* initial timeout in .1 secs */ 143 int retrans; /* times to retry send */ 144 int maxgrouplist; /* Max. size of group list */ 145 int readahead; /* # of blocks to readahead */ 146 int leaseterm; /* Term (sec) of lease */ 147 int deadthresh; /* Retrans threshold */ 148 char *hostname; /* server's name */ |
149 int acregmin; /* cache attrs for reg files min time */ 150 int acregmax; /* cache attrs for reg files max time */ 151 int acdirmin; /* cache attrs for dirs min time */ 152 int acdirmax; /* cache attrs for dirs max time */ |
153}; 154 155/* 156 * NFS mount option flags 157 */ 158#define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */ 159#define NFSMNT_WSIZE 0x00000002 /* set write size */ 160#define NFSMNT_RSIZE 0x00000004 /* set read size */ --- 7 unchanged lines hidden (view full) --- 168#define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */ 169#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ 170#define NFSMNT_LEASETERM 0x00001000 /* set lease term (nqnfs) */ 171#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */ 172#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */ 173#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */ 174#define NFSMNT_RDIRPLUS 0x00010000 /* Use Readdirplus for V3 */ 175#define NFSMNT_READDIRSIZE 0x00020000 /* Set readdir size */ |
176#define NFSMNT_ACREGMIN 0x00040000 177#define NFSMNT_ACREGMAX 0x00080000 178#define NFSMNT_ACDIRMIN 0x00100000 179#define NFSMNT_ACDIRMAX 0x00200000 |
180 |
181#define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */ 182#define NFSSTA_GOTPATHCONF 0x00080000 /* Got the V3 pathconf info */ 183#define NFSSTA_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */ 184#define NFSSTA_MNTD 0x00200000 /* Mnt server for mnt point */ 185#define NFSSTA_DISMINPROG 0x00400000 /* Dismount in progress */ 186#define NFSSTA_DISMNT 0x00800000 /* Dismounted */ 187#define NFSSTA_SNDLOCK 0x01000000 /* Send socket lock */ 188#define NFSSTA_WANTSND 0x02000000 /* Want above */ 189#define NFSSTA_RCVLOCK 0x04000000 /* Rcv socket lock */ 190#define NFSSTA_WANTRCV 0x08000000 /* Want above */ 191#define NFSSTA_WAITAUTH 0x10000000 /* Wait for authentication */ 192#define NFSSTA_HASAUTH 0x20000000 /* Has authenticator */ 193#define NFSSTA_WANTAUTH 0x40000000 /* Wants an authenticator */ 194#define NFSSTA_AUTHERR 0x80000000 /* Authentication error */ 195 |
196/* 197 * Structures for the nfssvc(2) syscall. Not that anyone but nfsd and mount_nfs 198 * should ever try and use it. 199 */ 200struct nfsd_args { 201 int sock; /* Socket to serve */ 202 caddr_t name; /* Client addr for connection based sockets */ 203 int namelen; /* Length of name */ --- 376 unchanged lines hidden (view full) --- 580int nfs_init __P((struct vfsconf *vfsp)); 581int nfs_reply __P((struct nfsreq *)); 582int nfs_getreq __P((struct nfsrv_descript *,struct nfsd *,int)); 583int nfs_send __P((struct socket *, struct sockaddr *, struct mbuf *, 584 struct nfsreq *)); 585int nfs_rephead __P((int, struct nfsrv_descript *, struct nfssvc_sock *, 586 int, int, u_quad_t *, struct mbuf **, struct mbuf **, 587 caddr_t *)); |
588int nfs_sndlock __P((int *, int *, struct nfsreq *)); 589void nfs_sndunlock __P((int *, int *)); |
590int nfs_disct __P((struct mbuf **, caddr_t *, int, int, caddr_t *)); 591int nfs_vinvalbuf __P((struct vnode *, int, struct ucred *, struct proc *, 592 int)); 593int nfs_readrpc __P((struct vnode *, struct uio *, struct ucred *)); 594int nfs_writerpc __P((struct vnode *, struct uio *, struct ucred *, int *, 595 int *)); 596int nfs_readdirrpc __P((struct vnode *, struct uio *, struct ucred *)); 597int nfs_asyncio __P((struct buf *, struct ucred *)); --- 125 unchanged lines hidden --- |