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
--- 16 unchanged lines hidden (view full) ---
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
33 * $FreeBSD: head/sys/nfsclient/nfs.h 138458 2004-12-06 16:11:25Z rwatson $
34 */
35
36#ifndef _NFSCLIENT_NFS_H_
37#define _NFSCLIENT_NFS_H_
38
39#ifdef _KERNEL
40#include "opt_nfs.h"
41#endif
--- 43 unchanged lines hidden (view full) ---
85#define NFS_CMPFH(n, f, s) \
86 ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
87#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
88
89#define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
90#define NFSSTA_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
91#define NFSSTA_SNDLOCK 0x01000000 /* Send socket lock */
92#define NFSSTA_WANTSND 0x02000000 /* Want above */
93#define NFSSTA_RCVLOCK 0x04000000 /* Rcv socket lock */
94#define NFSSTA_WANTRCV 0x08000000 /* Want above */
95#define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */
96
97
98/*
99 * XXX to allow amd to include nfs.h without nfsproto.h
100 */
101#ifdef NFS_NPROCS
102#include <nfsclient/nfsstats.h>
--- 43 unchanged lines hidden (view full) ---
146extern int nfsv3_procid[NFS_NPROCS];
147
148struct uio;
149struct buf;
150struct vattr;
151struct nameidata;
152
153/*
154 * The set of signals that interrupt an I/O in progress for NFSMNT_INT mounts.
155 * What should be in this set is open to debate, but I believe that since
156 * I/O system calls on ufs are never interrupted by signals the set should
157 * be minimal. My reasoning is that many current programs that use signals
158 * such as SIGALRM will not expect file I/O system calls to be interrupted
159 * by them and break.
160 */
161#define NFSINT_SIGMASK(set) \
162 (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
163 SIGISMEMBER(set, SIGHUP) || SIGISMEMBER(set, SIGKILL) || \
164 SIGISMEMBER(set, SIGQUIT))
165
166/*
167 * Socket errors ignored for connectionless sockets??
168 * For now, ignore them all
169 */
170#define NFSIGNORE_SOERROR(s, e) \
171 ((e) != EINTR && (e) != EIO && \
172 (e) != ERESTART && (e) != EWOULDBLOCK && \
173 ((s) & PR_CONNREQUIRED) == 0)
174
--- 141 unchanged lines hidden (view full) ---
316int nfsm_uiotombuf(struct uio *, struct mbuf **, int, caddr_t *);
317void nfs_clearcommit(struct mount *);
318int nfs_writebp(struct buf *, int, struct thread *);
319int nfs_fsinfo(struct nfsmount *, struct vnode *, struct ucred *,
320 struct thread *);
321int nfs_meta_setsize (struct vnode *, struct ucred *,
322 struct thread *, u_quad_t);
323
324#endif /* _KERNEL */
325
326#endif
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
--- 16 unchanged lines hidden (view full) ---
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)nfs.h 8.4 (Berkeley) 5/1/95
33 * $FreeBSD: head/sys/nfsclient/nfs.h 138458 2004-12-06 16:11:25Z rwatson $
34 */
35
36#ifndef _NFSCLIENT_NFS_H_
37#define _NFSCLIENT_NFS_H_
38
39#ifdef _KERNEL
40#include "opt_nfs.h"
41#endif
--- 43 unchanged lines hidden (view full) ---
85#define NFS_CMPFH(n, f, s) \
86 ((n)->n_fhsize == (s) && !bcmp((caddr_t)(n)->n_fhp, (caddr_t)(f), (s)))
87#define NFS_ISV3(v) (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
88
89#define NFSSTA_HASWRITEVERF 0x00040000 /* Has write verifier for V3 */
90#define NFSSTA_GOTFSINFO 0x00100000 /* Got the V3 fsinfo */
91#define NFSSTA_SNDLOCK 0x01000000 /* Send socket lock */
92#define NFSSTA_WANTSND 0x02000000 /* Want above */
93#define NFSSTA_RCVLOCK 0x04000000 /* Rcv socket lock */
94#define NFSSTA_WANTRCV 0x08000000 /* Want above */
95#define NFSSTA_TIMEO 0x10000000 /* Experiencing a timeout */
96
97
98/*
99 * XXX to allow amd to include nfs.h without nfsproto.h
100 */
101#ifdef NFS_NPROCS
102#include <nfsclient/nfsstats.h>
--- 43 unchanged lines hidden (view full) ---
146extern int nfsv3_procid[NFS_NPROCS];
147
148struct uio;
149struct buf;
150struct vattr;
151struct nameidata;
152
153/*
154 * The set of signals that interrupt an I/O in progress for NFSMNT_INT mounts.
155 * What should be in this set is open to debate, but I believe that since
156 * I/O system calls on ufs are never interrupted by signals the set should
157 * be minimal. My reasoning is that many current programs that use signals
158 * such as SIGALRM will not expect file I/O system calls to be interrupted
159 * by them and break.
160 */
161#define NFSINT_SIGMASK(set) \
162 (SIGISMEMBER(set, SIGINT) || SIGISMEMBER(set, SIGTERM) || \
163 SIGISMEMBER(set, SIGHUP) || SIGISMEMBER(set, SIGKILL) || \
164 SIGISMEMBER(set, SIGQUIT))
165
166/*
167 * Socket errors ignored for connectionless sockets??
168 * For now, ignore them all
169 */
170#define NFSIGNORE_SOERROR(s, e) \
171 ((e) != EINTR && (e) != EIO && \
172 (e) != ERESTART && (e) != EWOULDBLOCK && \
173 ((s) & PR_CONNREQUIRED) == 0)
174
--- 141 unchanged lines hidden (view full) ---
316int nfsm_uiotombuf(struct uio *, struct mbuf **, int, caddr_t *);
317void nfs_clearcommit(struct mount *);
318int nfs_writebp(struct buf *, int, struct thread *);
319int nfs_fsinfo(struct nfsmount *, struct vnode *, struct ucred *,
320 struct thread *);
321int nfs_meta_setsize (struct vnode *, struct ucred *,
322 struct thread *, u_quad_t);
323
324#endif /* _KERNEL */
325
326#endif