137e65185Smckusick /* 283adbb3cSbostic * Copyright (c) 1989, 1991, 1993 383adbb3cSbostic * The Regents of the University of California. All rights reserved. 437e65185Smckusick * 598799fb9Sbostic * %sccs.include.redist.c% 637e65185Smckusick * 7*f8c6f73fShibler * @(#)mount.h 8.7 (Berkeley) 01/13/94 837e65185Smckusick */ 937e65185Smckusick 109578c90fSmckusick #ifndef KERNEL 119578c90fSmckusick #include <sys/ucred.h> 129578c90fSmckusick #endif 13134356a5Smckusick #include <sys/queue.h> 149578c90fSmckusick 151349db62Smckusick typedef struct { long val[2]; } fsid_t; /* file system id type */ 1637e65185Smckusick 1737e65185Smckusick /* 1837e65185Smckusick * File identifier. 1937e65185Smckusick * These are unique per filesystem on a single machine. 2037e65185Smckusick */ 2137e65185Smckusick #define MAXFIDSZ 16 2237e65185Smckusick 2337e65185Smckusick struct fid { 2437e65185Smckusick u_short fid_len; /* length of data in bytes */ 25a504fefbSmckusick u_short fid_reserved; /* force longword alignment */ 2637e65185Smckusick char fid_data[MAXFIDSZ]; /* data (variable length) */ 2737e65185Smckusick }; 2837e65185Smckusick 2937e65185Smckusick /* 307321ffb6Smckusick * file system statistics 317321ffb6Smckusick */ 327321ffb6Smckusick 337321ffb6Smckusick #define MNAMELEN 90 /* length of buffer for returned name */ 347321ffb6Smckusick 357321ffb6Smckusick struct statfs { 367321ffb6Smckusick short f_type; /* type of filesystem (see below) */ 377321ffb6Smckusick short f_flags; /* copy of mount flags */ 38f6f794dcSmckusick long f_bsize; /* fundamental file system block size */ 39f6f794dcSmckusick long f_iosize; /* optimal transfer block size */ 407321ffb6Smckusick long f_blocks; /* total data blocks in file system */ 417321ffb6Smckusick long f_bfree; /* free blocks in fs */ 427321ffb6Smckusick long f_bavail; /* free blocks avail to non-superuser */ 437321ffb6Smckusick long f_files; /* total file nodes in file system */ 447321ffb6Smckusick long f_ffree; /* free file nodes in fs */ 457321ffb6Smckusick fsid_t f_fsid; /* file system id */ 467321ffb6Smckusick long f_spare[9]; /* spare for later */ 477321ffb6Smckusick char f_mntonname[MNAMELEN]; /* directory on which mounted */ 487321ffb6Smckusick char f_mntfromname[MNAMELEN];/* mounted filesystem */ 497321ffb6Smckusick }; 5008be226dSkarels 517321ffb6Smckusick /* 527321ffb6Smckusick * File system types. 537321ffb6Smckusick */ 547321ffb6Smckusick #define MOUNT_NONE 0 55a0121656Smckusick #define MOUNT_UFS 1 /* Fast Filesystem */ 56a0121656Smckusick #define MOUNT_NFS 2 /* Sun-compatible Network Filesystem */ 57a0121656Smckusick #define MOUNT_MFS 3 /* Memory-based Filesystem */ 58a0121656Smckusick #define MOUNT_MSDOS 4 /* MS/DOS Filesystem */ 59a0121656Smckusick #define MOUNT_LFS 5 /* Log-based Filesystem */ 60a0121656Smckusick #define MOUNT_LOFS 6 /* Loopback Filesystem */ 61a0121656Smckusick #define MOUNT_FDESC 7 /* File Descriptor Filesystem */ 62a0121656Smckusick #define MOUNT_PORTAL 8 /* Portal Filesystem */ 63a0121656Smckusick #define MOUNT_NULL 9 /* Minimal Filesystem Layer */ 64a0121656Smckusick #define MOUNT_UMAP 10 /* User/Group Identifer Remapping Filesystem */ 65a0121656Smckusick #define MOUNT_KERNFS 11 /* Kernel Information Filesystem */ 66a0121656Smckusick #define MOUNT_PROCFS 12 /* /proc Filesystem */ 67*f8c6f73fShibler #define MOUNT_AFS 13 /* Andrew Filesystem */ 6851d4aa02Shibler #define MOUNT_ISOFS 14 /* ISO9660 (aka CDROM) Filesystem */ 6951d4aa02Shibler #define MOUNT_MAXTYPE 14 705dee720bSmckusick 715dee720bSmckusick #define INITMOUNTNAMES { \ 725dee720bSmckusick "none", /* 0 MOUNT_NONE */ \ 735dee720bSmckusick "ufs", /* 1 MOUNT_UFS */ \ 745dee720bSmckusick "nfs", /* 2 MOUNT_NFS */ \ 755dee720bSmckusick "mfs", /* 3 MOUNT_MFS */ \ 765dee720bSmckusick "pc", /* 4 MOUNT_PC */ \ 775dee720bSmckusick "lfs", /* 5 MOUNT_LFS */ \ 785dee720bSmckusick "lofs", /* 6 MOUNT_LOFS */ \ 795dee720bSmckusick "fdesc", /* 7 MOUNT_FDESC */ \ 805dee720bSmckusick "portal", /* 8 MOUNT_PORTAL */ \ 815dee720bSmckusick "null", /* 9 MOUNT_NULL */ \ 825dee720bSmckusick "umap", /* 10 MOUNT_UMAP */ \ 83e85dc186Spendry "kernfs", /* 11 MOUNT_KERNFS */ \ 84a54ed4e5Spendry "procfs", /* 12 MOUNT_PROCFS */ \ 8551d4aa02Shibler "afs", /* 13 MOUNT_AFS */ \ 8651d4aa02Shibler "iso9660fs", /* 14 MOUNT_ISOFS */ \ 8751d4aa02Shibler 0, /* 15 MOUNT_SPARE */ \ 885dee720bSmckusick } 897321ffb6Smckusick 907321ffb6Smckusick /* 913cad2a65Sbostic * Structure per mounted file system. Each mounted file system has an 923cad2a65Sbostic * array of operations and an instance record. The file systems are 933cad2a65Sbostic * put on a doubly linked list. 9437e65185Smckusick */ 95134356a5Smckusick LIST_HEAD(vnodelst, vnode); 96134356a5Smckusick 9737e65185Smckusick struct mount { 98134356a5Smckusick TAILQ_ENTRY(mount) mnt_list; /* mount list */ 9942bc6a02Smckusick struct vfsops *mnt_op; /* operations on fs */ 10042bc6a02Smckusick struct vnode *mnt_vnodecovered; /* vnode we mounted on */ 101134356a5Smckusick struct vnodelst mnt_vnodelist; /* list of vnodes this mount */ 10242bc6a02Smckusick int mnt_flag; /* flags */ 10302cb89ebSmckusick int mnt_maxsymlinklen; /* max size of short symlink */ 10442bc6a02Smckusick struct statfs mnt_stat; /* cache of filesystem stats */ 10542bc6a02Smckusick qaddr_t mnt_data; /* private data */ 10637e65185Smckusick }; 10737e65185Smckusick 10837e65185Smckusick /* 109cc73f08eSmckusick * Mount flags. 1100ad268d3Smckusick * 1110ad268d3Smckusick * Unmount uses MNT_FORCE flag. 11237e65185Smckusick */ 11342bc6a02Smckusick #define MNT_RDONLY 0x00000001 /* read only filesystem */ 11442bc6a02Smckusick #define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */ 11542bc6a02Smckusick #define MNT_NOEXEC 0x00000004 /* can't exec from filesystem */ 11642bc6a02Smckusick #define MNT_NOSUID 0x00000008 /* don't honor setuid bits on fs */ 11742bc6a02Smckusick #define MNT_NODEV 0x00000010 /* don't interpret special files */ 118b262b538Spendry #define MNT_UNION 0x00000020 /* union with underlying filesystem */ 11996aa0fb0Smckusick #define MNT_ASYNC 0x00000040 /* file system written asynchronously */ 12008be226dSkarels 12137e65185Smckusick /* 12237e65185Smckusick * exported mount flags. 12337e65185Smckusick */ 124d5bca046Smckusick #define MNT_EXRDONLY 0x00000080 /* exported read only */ 12542bc6a02Smckusick #define MNT_EXPORTED 0x00000100 /* file system is exported */ 126d5bca046Smckusick #define MNT_DEFEXPORTED 0x00000200 /* exported to the world */ 127d5bca046Smckusick #define MNT_EXPORTANON 0x00000400 /* use anon uid mapping for everyone */ 128d5bca046Smckusick #define MNT_EXKERB 0x00000800 /* exported with Kerberos uid mapping */ 12908be226dSkarels 13029abdb40Smckusick /* 13129abdb40Smckusick * Flags set by internal operations. 13229abdb40Smckusick */ 13342bc6a02Smckusick #define MNT_LOCAL 0x00001000 /* filesystem is stored locally */ 13442bc6a02Smckusick #define MNT_QUOTA 0x00002000 /* quotas are enabled on filesystem */ 135134356a5Smckusick #define MNT_ROOTFS 0x00004000 /* identifies the root filesystem */ 13608be226dSkarels 1376c77ce8eSmckusick /* 1386c77ce8eSmckusick * Mask of flags that are visible to statfs() 1396c77ce8eSmckusick */ 14042bc6a02Smckusick #define MNT_VISFLAGMASK 0x0000ffff 14108be226dSkarels 14237e65185Smckusick /* 143cc73f08eSmckusick * filesystem control flags. 144cc73f08eSmckusick * 14542bc6a02Smckusick * MNT_MLOCK lock the mount entry so that name lookup cannot proceed 146cc73f08eSmckusick * past the mount point. This keeps the subtree stable during mounts 147cc73f08eSmckusick * and unmounts. 14837e65185Smckusick */ 14942bc6a02Smckusick #define MNT_UPDATE 0x00010000 /* not a real mount, just an update */ 150d5bca046Smckusick #define MNT_DELEXPORT 0x00020000 /* delete export host lists */ 1510ad268d3Smckusick #define MNT_RELOAD 0x00040000 /* reload filesystem data */ 1520ad268d3Smckusick #define MNT_FORCE 0x00080000 /* force unmount or readonly change */ 15342bc6a02Smckusick #define MNT_MLOCK 0x00100000 /* lock so that subtree is stable */ 15442bc6a02Smckusick #define MNT_MWAIT 0x00200000 /* someone is waiting for lock */ 15542bc6a02Smckusick #define MNT_MPBUSY 0x00400000 /* scan of mount point in progress */ 15642bc6a02Smckusick #define MNT_MPWANT 0x00800000 /* waiting for mount point */ 15742bc6a02Smckusick #define MNT_UNMOUNT 0x01000000 /* unmount in progress */ 1580ad268d3Smckusick #define MNT_WANTRDWR 0x02000000 /* want upgrade to read/write */ 15937e65185Smckusick 16037e65185Smckusick /* 16137e65185Smckusick * Operations supported on mounted file system. 16237e65185Smckusick */ 1636f6d14e4Smckusick #ifdef KERNEL 16408be226dSkarels #ifdef __STDC__ 1653d6b36cdSmckusick struct nameidata; 166f59765e9Smckusick struct mbuf; 16708be226dSkarels #endif 16808be226dSkarels 16937e65185Smckusick struct vfsops { 17008be226dSkarels int (*vfs_mount) __P((struct mount *mp, char *path, caddr_t data, 17108be226dSkarels struct nameidata *ndp, struct proc *p)); 17208be226dSkarels int (*vfs_start) __P((struct mount *mp, int flags, 1733d6b36cdSmckusick struct proc *p)); 17408be226dSkarels int (*vfs_unmount) __P((struct mount *mp, int mntflags, 1753d6b36cdSmckusick struct proc *p)); 17608be226dSkarels int (*vfs_root) __P((struct mount *mp, struct vnode **vpp)); 177d0174f3dSmckusick int (*vfs_quotactl) __P((struct mount *mp, int cmds, uid_t uid, 17808be226dSkarels caddr_t arg, struct proc *p)); 17908be226dSkarels int (*vfs_statfs) __P((struct mount *mp, struct statfs *sbp, 1803d6b36cdSmckusick struct proc *p)); 181d0174f3dSmckusick int (*vfs_sync) __P((struct mount *mp, int waitfor, 182d0174f3dSmckusick struct ucred *cred, struct proc *p)); 183388852a9Smckusick int (*vfs_vget) __P((struct mount *mp, ino_t ino, 184388852a9Smckusick struct vnode **vpp)); 18508be226dSkarels int (*vfs_fhtovp) __P((struct mount *mp, struct fid *fhp, 186f59765e9Smckusick struct mbuf *nam, struct vnode **vpp, 187f59765e9Smckusick int *exflagsp, struct ucred **credanonp)); 18808be226dSkarels int (*vfs_vptofh) __P((struct vnode *vp, struct fid *fhp)); 1893cad2a65Sbostic int (*vfs_init) __P((void)); 19037e65185Smckusick }; 19137e65185Smckusick 1923d6b36cdSmckusick #define VFS_MOUNT(MP, PATH, DATA, NDP, P) \ 1933d6b36cdSmckusick (*(MP)->mnt_op->vfs_mount)(MP, PATH, DATA, NDP, P) 1943d6b36cdSmckusick #define VFS_START(MP, FLAGS, P) (*(MP)->mnt_op->vfs_start)(MP, FLAGS, P) 1953d6b36cdSmckusick #define VFS_UNMOUNT(MP, FORCE, P) (*(MP)->mnt_op->vfs_unmount)(MP, FORCE, P) 19642bc6a02Smckusick #define VFS_ROOT(MP, VPP) (*(MP)->mnt_op->vfs_root)(MP, VPP) 1973d6b36cdSmckusick #define VFS_QUOTACTL(MP,C,U,A,P) (*(MP)->mnt_op->vfs_quotactl)(MP, C, U, A, P) 1983d6b36cdSmckusick #define VFS_STATFS(MP, SBP, P) (*(MP)->mnt_op->vfs_statfs)(MP, SBP, P) 199d0174f3dSmckusick #define VFS_SYNC(MP, WAIT, C, P) (*(MP)->mnt_op->vfs_sync)(MP, WAIT, C, P) 200388852a9Smckusick #define VFS_VGET(MP, INO, VPP) (*(MP)->mnt_op->vfs_vget)(MP, INO, VPP) 201f59765e9Smckusick #define VFS_FHTOVP(MP, FIDP, NAM, VPP, EXFLG, CRED) \ 202f59765e9Smckusick (*(MP)->mnt_op->vfs_fhtovp)(MP, FIDP, NAM, VPP, EXFLG, CRED) 20342bc6a02Smckusick #define VFS_VPTOFH(VP, FIDP) (*(VP)->v_mount->mnt_op->vfs_vptofh)(VP, FIDP) 2046f6d14e4Smckusick #endif /* KERNEL */ 20537e65185Smckusick 20637e65185Smckusick /* 2077321ffb6Smckusick * Flags for various system call interfaces. 2087321ffb6Smckusick * 2097321ffb6Smckusick * waitfor flags to vfs_sync() and getfsstat() 21037e65185Smckusick */ 21137e65185Smckusick #define MNT_WAIT 1 21237e65185Smckusick #define MNT_NOWAIT 2 21337e65185Smckusick 21437e65185Smckusick /* 215da162f6bSmckusick * Generic file handle 216da162f6bSmckusick */ 217da162f6bSmckusick struct fhandle { 218da162f6bSmckusick fsid_t fh_fsid; /* File system id of mount point */ 2199578c90fSmckusick struct fid fh_fid; /* File sys specific id */ 220da162f6bSmckusick }; 221da162f6bSmckusick typedef struct fhandle fhandle_t; 222da162f6bSmckusick 223a04da360Smckusick #ifdef KERNEL 224a04da360Smckusick #include <net/radix.h> 22551d4aa02Shibler #include <sys/socket.h> /* XXX for AF_MAX */ 2269578c90fSmckusick 2279578c90fSmckusick /* 228a04da360Smckusick * Network address lookup element 2299578c90fSmckusick */ 230a04da360Smckusick struct netcred { 231a04da360Smckusick struct radix_node netc_rnodes[2]; 232a04da360Smckusick int netc_exflags; 233a04da360Smckusick struct ucred netc_anon; 234a04da360Smckusick }; 23551d4aa02Shibler 23651d4aa02Shibler /* 23751d4aa02Shibler * Network export information 23851d4aa02Shibler */ 23951d4aa02Shibler struct netexport { 24051d4aa02Shibler struct netcred ne_defexported; /* Default export */ 24151d4aa02Shibler struct radix_node_head *ne_rtable[AF_MAX+1]; /* Individual exports */ 24251d4aa02Shibler }; 243a04da360Smckusick #endif /* KERNEL */ 2449578c90fSmckusick 2459578c90fSmckusick /* 24651d4aa02Shibler * Export arguments for local filesystem mount calls. 24751d4aa02Shibler */ 24851d4aa02Shibler struct export_args { 24951d4aa02Shibler int ex_flags; /* export related flags */ 25051d4aa02Shibler uid_t ex_root; /* mapping for root uid */ 25151d4aa02Shibler struct ucred ex_anon; /* mapping for anonymous user */ 25251d4aa02Shibler struct sockaddr *ex_addr; /* net address to which exported */ 25351d4aa02Shibler int ex_addrlen; /* and the net address length */ 25451d4aa02Shibler struct sockaddr *ex_mask; /* mask of valid bits in saddr */ 25551d4aa02Shibler int ex_masklen; /* and the smask length */ 25651d4aa02Shibler }; 25751d4aa02Shibler 25851d4aa02Shibler /* 259d5bca046Smckusick * Arguments to mount UFS-based filesystems 260c933c9cbSmckusick */ 261c933c9cbSmckusick struct ufs_args { 262c933c9cbSmckusick char *fspec; /* block special device to mount */ 26351d4aa02Shibler struct export_args export; /* network export information */ 264c933c9cbSmckusick }; 265c933c9cbSmckusick 266cc73f08eSmckusick #ifdef MFS 267cc73f08eSmckusick /* 268cc73f08eSmckusick * Arguments to mount MFS 269cc73f08eSmckusick */ 270cc73f08eSmckusick struct mfs_args { 27151d4aa02Shibler char *fspec; /* name to export for statfs */ 27251d4aa02Shibler struct export_args export; /* if exported MFSes are supported */ 27351d4aa02Shibler caddr_t base; /* base of file system in memory */ 274c933c9cbSmckusick u_long size; /* size of file system */ 275cc73f08eSmckusick }; 2763cad2a65Sbostic #endif /* MFS */ 277cc73f08eSmckusick 27851d4aa02Shibler #ifdef ISOFS 27951d4aa02Shibler /* 28051d4aa02Shibler * Arguments to mount ISO 9660 filesystems. 28151d4aa02Shibler */ 28251d4aa02Shibler struct iso_args { 28351d4aa02Shibler char *fspec; /* block special device to mount */ 28451d4aa02Shibler struct export_args export; /* network export info */ 28551d4aa02Shibler int flags; /* mounting flags, see below */ 28651d4aa02Shibler 28751d4aa02Shibler }; 28851d4aa02Shibler #define ISOFSMNT_NORRIP 0x00000001 /* disable Rock Ridge Ext.*/ 28951d4aa02Shibler #define ISOFSMNT_GENS 0x00000002 /* enable generation numbers */ 29051d4aa02Shibler #define ISOFSMNT_EXTATT 0x00000004 /* enable extended attributes */ 29151d4aa02Shibler #define ISOFSMNT_NOTRANS 0x00000008 /* disable filename translation */ 29251d4aa02Shibler #endif /* ISOFS */ 29351d4aa02Shibler 29437e65185Smckusick #ifdef NFS 29537e65185Smckusick /* 296b70b215bSmckusick * File Handle (32 bytes for version 2), variable up to 1024 for version 3 297b70b215bSmckusick */ 298e9cd9283Smckusick union nfsv2fh { 299e9cd9283Smckusick fhandle_t fh_generic; 300b70b215bSmckusick u_char fh_bytes[32]; 301b70b215bSmckusick }; 302e9cd9283Smckusick typedef union nfsv2fh nfsv2fh_t; 303b70b215bSmckusick 304b70b215bSmckusick /* 30537e65185Smckusick * Arguments to mount NFS 30637e65185Smckusick */ 30737e65185Smckusick struct nfs_args { 30835170248Smckusick struct sockaddr *addr; /* file server address */ 3099578c90fSmckusick int addrlen; /* length of address */ 31035170248Smckusick int sotype; /* Socket type */ 31135170248Smckusick int proto; /* and Protocol */ 312da162f6bSmckusick nfsv2fh_t *fh; /* File handle to be mounted */ 31337e65185Smckusick int flags; /* flags */ 31437e65185Smckusick int wsize; /* write size in bytes */ 31537e65185Smckusick int rsize; /* read size in bytes */ 31637e65185Smckusick int timeo; /* initial timeout in .1 secs */ 31737e65185Smckusick int retrans; /* times to retry send */ 3189578c90fSmckusick int maxgrouplist; /* Max. size of group list */ 3199578c90fSmckusick int readahead; /* # of blocks to readahead */ 3209578c90fSmckusick int leaseterm; /* Term (sec) of lease */ 3219578c90fSmckusick int deadthresh; /* Retrans threshold */ 32237e65185Smckusick char *hostname; /* server's name */ 32337e65185Smckusick }; 3243cad2a65Sbostic 3259578c90fSmckusick 32637e65185Smckusick /* 32737e65185Smckusick * NFS mount option flags 32837e65185Smckusick */ 3299578c90fSmckusick #define NFSMNT_SOFT 0x00000001 /* soft mount (hard is default) */ 3309578c90fSmckusick #define NFSMNT_WSIZE 0x00000002 /* set write size */ 3319578c90fSmckusick #define NFSMNT_RSIZE 0x00000004 /* set read size */ 3329578c90fSmckusick #define NFSMNT_TIMEO 0x00000008 /* set initial timeout */ 3339578c90fSmckusick #define NFSMNT_RETRANS 0x00000010 /* set number of request retrys */ 3349578c90fSmckusick #define NFSMNT_MAXGRPS 0x00000020 /* set maximum grouplist size */ 3359578c90fSmckusick #define NFSMNT_INT 0x00000040 /* allow interrupts on hard mount */ 3369578c90fSmckusick #define NFSMNT_NOCONN 0x00000080 /* Don't Connect the socket */ 3379578c90fSmckusick #define NFSMNT_NQNFS 0x00000100 /* Use Nqnfs protocol */ 3389578c90fSmckusick #define NFSMNT_MYWRITE 0x00000200 /* Assume writes were mine */ 3399578c90fSmckusick #define NFSMNT_KERB 0x00000400 /* Use Kerberos authentication */ 3409578c90fSmckusick #define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */ 3419578c90fSmckusick #define NFSMNT_RDIRALOOK 0x00001000 /* Do lookup with readdir (nqnfs) */ 3429578c90fSmckusick #define NFSMNT_LEASETERM 0x00002000 /* set lease term (nqnfs) */ 3439578c90fSmckusick #define NFSMNT_READAHEAD 0x00004000 /* set read ahead */ 3449578c90fSmckusick #define NFSMNT_DEADTHRESH 0x00008000 /* set dead server retry thresh */ 3459578c90fSmckusick #define NFSMNT_NQLOOKLEASE 0x00010000 /* Get lease for lookup */ 3469570c57eSmckusick #define NFSMNT_RESVPORT 0x00020000 /* Allocate a reserved port */ 3479578c90fSmckusick #define NFSMNT_INTERNAL 0xffe00000 /* Bits set internally */ 3489578c90fSmckusick #define NFSMNT_MNTD 0x00200000 /* Mnt server for mnt point */ 3499578c90fSmckusick #define NFSMNT_DISMINPROG 0x00400000 /* Dismount in progress */ 3509578c90fSmckusick #define NFSMNT_DISMNT 0x00800000 /* Dismounted */ 3519578c90fSmckusick #define NFSMNT_SNDLOCK 0x01000000 /* Send socket lock */ 3529578c90fSmckusick #define NFSMNT_WANTSND 0x02000000 /* Want above */ 3539578c90fSmckusick #define NFSMNT_RCVLOCK 0x04000000 /* Rcv socket lock */ 3549578c90fSmckusick #define NFSMNT_WANTRCV 0x08000000 /* Want above */ 3559578c90fSmckusick #define NFSMNT_WAITAUTH 0x10000000 /* Wait for authentication */ 3569578c90fSmckusick #define NFSMNT_HASAUTH 0x20000000 /* Has authenticator */ 3579578c90fSmckusick #define NFSMNT_WANTAUTH 0x40000000 /* Wants an authenticator */ 3589578c90fSmckusick #define NFSMNT_AUTHERR 0x80000000 /* Authentication error */ 3593cad2a65Sbostic #endif /* NFS */ 36037e65185Smckusick 36137e65185Smckusick #ifdef KERNEL 36237e65185Smckusick /* 36337e65185Smckusick * exported vnode operations 36437e65185Smckusick */ 36551d4aa02Shibler struct mount *getvfs __P((fsid_t *)); /* return vfs given fsid */ 36651d4aa02Shibler int vfs_export /* process mount export info */ 36751d4aa02Shibler __P((struct mount *, struct netexport *, struct export_args *)); 36851d4aa02Shibler struct netcred *vfs_export_lookup /* lookup host in fs export list */ 36951d4aa02Shibler __P((struct mount *, struct netexport *, struct mbuf *)); 37051d4aa02Shibler int vfs_lock __P((struct mount *)); /* lock a vfs */ 37151d4aa02Shibler int vfs_mountedon __P((struct vnode *));/* is a vfs mounted on vp */ 37251d4aa02Shibler void vfs_unlock __P((struct mount *)); /* unlock a vfs */ 373134356a5Smckusick extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */ 374134356a5Smckusick extern struct vfsops *vfssw[]; /* filesystem type table */ 37508be226dSkarels 37608be226dSkarels #else /* KERNEL */ 377bda92a63Sdonn 378bda92a63Sdonn #include <sys/cdefs.h> 379bda92a63Sdonn 380bda92a63Sdonn __BEGIN_DECLS 381bda92a63Sdonn int fstatfs __P((int, struct statfs *)); 382e4746589Sdonn int getfh __P((const char *, fhandle_t *)); 383e4746589Sdonn int getfsstat __P((struct statfs *, long, int)); 384bda92a63Sdonn int getmntinfo __P((struct statfs **, int)); 385e4746589Sdonn int mount __P((int, const char *, int, void *)); 386bda92a63Sdonn int statfs __P((const char *, struct statfs *)); 387bda92a63Sdonn int unmount __P((const char *, int)); 388bda92a63Sdonn __END_DECLS 389bda92a63Sdonn 39008be226dSkarels #endif /* KERNEL */ 391