The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/fs/nfsclient/nfs.h

Version: -  FREEBSD  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  * Copyright (c) 1989, 1993
    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
    9  * modification, are permitted provided that the following conditions
   10  * are met:
   11  * 1. Redistributions of source code must retain the above copyright
   12  *    notice, this list of conditions and the following disclaimer.
   13  * 2. Redistributions in binary form must reproduce the above copyright
   14  *    notice, this list of conditions and the following disclaimer in the
   15  *    documentation and/or other materials provided with the distribution.
   16  * 4. Neither the name of the University nor the names of its contributors
   17  *    may be used to endorse or promote products derived from this software
   18  *    without specific prior written permission.
   19  *
   20  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
   21  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
   24  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   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  * $FreeBSD: releng/9.2/sys/fs/nfsclient/nfs.h 221040 2011-04-25 23:12:18Z rmacklem $
   33  */
   34 
   35 #ifndef _NFSCLIENT_NFS_H_
   36 #define _NFSCLIENT_NFS_H_
   37 
   38 #if defined(_KERNEL)
   39 
   40 #ifndef NFS_TPRINTF_INITIAL_DELAY
   41 #define NFS_TPRINTF_INITIAL_DELAY       12
   42 #endif
   43 
   44 #ifndef NFS_TPRINTF_DELAY
   45 #define NFS_TPRINTF_DELAY               30
   46 #endif
   47 
   48 /*
   49  * Nfs version macros.
   50  */
   51 #define NFS_ISV3(v) \
   52         (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV3)
   53 #define NFS_ISV4(v) \
   54         (VFSTONFS((v)->v_mount)->nm_flag & NFSMNT_NFSV4)
   55 #define NFS_ISV34(v) \
   56         (VFSTONFS((v)->v_mount)->nm_flag & (NFSMNT_NFSV3 | NFSMNT_NFSV4))
   57 
   58 /*
   59  * NFS iod threads can be in one of these three states once spawned.
   60  * NFSIOD_NOT_AVAILABLE - Cannot be assigned an I/O operation at this time.
   61  * NFSIOD_AVAILABLE - Available to be assigned an I/O operation.
   62  * NFSIOD_CREATED_FOR_NFS_ASYNCIO - Newly created for nfs_asyncio() and
   63  *      will be used by the thread that called nfs_asyncio().
   64  */
   65 enum nfsiod_state {
   66         NFSIOD_NOT_AVAILABLE = 0,
   67         NFSIOD_AVAILABLE = 1,
   68         NFSIOD_CREATED_FOR_NFS_ASYNCIO = 2,
   69 };
   70 
   71 /*
   72  * Function prototypes.
   73  */
   74 int ncl_meta_setsize(struct vnode *, struct ucred *, struct thread *,
   75     u_quad_t);
   76 void ncl_doio_directwrite(struct buf *);
   77 int ncl_bioread(struct vnode *, struct uio *, int, struct ucred *);
   78 int ncl_biowrite(struct vnode *, struct uio *, int, struct ucred *);
   79 int ncl_vinvalbuf(struct vnode *, int, struct thread *, int);
   80 int ncl_asyncio(struct nfsmount *, struct buf *, struct ucred *,
   81     struct thread *);
   82 int ncl_doio(struct vnode *, struct buf *, struct ucred *, struct thread *,
   83     int);
   84 void ncl_nhinit(void);
   85 void ncl_nhuninit(void);
   86 void ncl_nodelock(struct nfsnode *);
   87 void ncl_nodeunlock(struct nfsnode *);
   88 int ncl_getattrcache(struct vnode *, struct vattr *);
   89 int ncl_readrpc(struct vnode *, struct uio *, struct ucred *);
   90 int ncl_writerpc(struct vnode *, struct uio *, struct ucred *, int *, int *,
   91     int);
   92 int ncl_readlinkrpc(struct vnode *, struct uio *, struct ucred *);
   93 int ncl_readdirrpc(struct vnode *, struct uio *, struct ucred *,
   94     struct thread *);
   95 int ncl_readdirplusrpc(struct vnode *, struct uio *, struct ucred *,
   96     struct thread *);
   97 int ncl_writebp(struct buf *, int, struct thread *);
   98 int ncl_commit(struct vnode *, u_quad_t, int, struct ucred *, struct thread *);
   99 void ncl_clearcommit(struct mount *);
  100 int ncl_fsinfo(struct nfsmount *, struct vnode *, struct ucred *,
  101     struct thread *);
  102 int ncl_init(struct vfsconf *);
  103 int ncl_uninit(struct vfsconf *);
  104 void    ncl_nfsiodnew(void);
  105 void    ncl_nfsiodnew_tq(__unused void *, int);
  106 
  107 #endif  /* _KERNEL */
  108 
  109 #endif  /* _NFSCLIENT_NFS_H_ */

Cache object: ae0f54b2ae17109d32d2779aa09b44de


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.