Deleted Added
full compact
nfs_clsubs.c (210786) nfs_clsubs.c (220683)
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

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

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 * from nfs_subs.c 8.8 (Berkeley) 5/22/95
33 */
34
35#include <sys/cdefs.h>
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

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

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 * from nfs_subs.c 8.8 (Berkeley) 5/22/95
33 */
34
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/sys/fs/nfsclient/nfs_clsubs.c 210786 2010-08-03 01:49:28Z rmacklem $");
36__FBSDID("$FreeBSD: head/sys/fs/nfsclient/nfs_clsubs.c 220683 2011-04-15 23:07:48Z rmacklem $");
37
38/*
39 * These functions support the macros and help fiddle mbuf chains for
40 * the nfs op functions. They do things like create the rpc header and
41 * copy data between mbuf chains and uio lists.
42 */
43
44#include <sys/param.h>

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

52#include <sys/namei.h>
53#include <sys/mbuf.h>
54#include <sys/socket.h>
55#include <sys/stat.h>
56#include <sys/malloc.h>
57#include <sys/sysent.h>
58#include <sys/syscall.h>
59#include <sys/sysproto.h>
37
38/*
39 * These functions support the macros and help fiddle mbuf chains for
40 * the nfs op functions. They do things like create the rpc header and
41 * copy data between mbuf chains and uio lists.
42 */
43
44#include <sys/param.h>

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

52#include <sys/namei.h>
53#include <sys/mbuf.h>
54#include <sys/socket.h>
55#include <sys/stat.h>
56#include <sys/malloc.h>
57#include <sys/sysent.h>
58#include <sys/syscall.h>
59#include <sys/sysproto.h>
60#include <sys/taskqueue.h>
60
61#include <vm/vm.h>
62#include <vm/vm_object.h>
63#include <vm/vm_extern.h>
64#include <vm/uma.h>
65
66#include <fs/nfs/nfsport.h>
67#include <fs/nfsclient/nfsnode.h>

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

72
73/*
74 * Note that stdarg.h and the ANSI style va_start macro is used for both
75 * ANSI and traditional C compilers.
76 */
77#include <machine/stdarg.h>
78
79extern struct mtx ncl_iod_mutex;
61
62#include <vm/vm.h>
63#include <vm/vm_object.h>
64#include <vm/vm_extern.h>
65#include <vm/uma.h>
66
67#include <fs/nfs/nfsport.h>
68#include <fs/nfsclient/nfsnode.h>

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

73
74/*
75 * Note that stdarg.h and the ANSI style va_start macro is used for both
76 * ANSI and traditional C compilers.
77 */
78#include <machine/stdarg.h>
79
80extern struct mtx ncl_iod_mutex;
80extern enum nfsiod_state ncl_iodwant[NFS_MAXRAHEAD];
81extern struct nfsmount *ncl_iodmount[NFS_MAXRAHEAD];
81extern enum nfsiod_state ncl_iodwant[NFS_MAXASYNCDAEMON];
82extern struct nfsmount *ncl_iodmount[NFS_MAXASYNCDAEMON];
82extern int ncl_numasync;
83extern unsigned int ncl_iodmax;
84extern struct nfsstats newnfsstats;
85
83extern int ncl_numasync;
84extern unsigned int ncl_iodmax;
85extern struct nfsstats newnfsstats;
86
87struct task ncl_nfsiodnew_task;
88
86int
87ncl_uninit(struct vfsconf *vfsp)
88{
89 /*
90 * XXX: Unloading of nfscl module is unsupported.
91 */
92#if 0
93 int i;

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

388 * Called once to initialize data structures...
389 */
390int
391ncl_init(struct vfsconf *vfsp)
392{
393 int i;
394
395 /* Ensure async daemons disabled */
89int
90ncl_uninit(struct vfsconf *vfsp)
91{
92 /*
93 * XXX: Unloading of nfscl module is unsupported.
94 */
95#if 0
96 int i;

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

391 * Called once to initialize data structures...
392 */
393int
394ncl_init(struct vfsconf *vfsp)
395{
396 int i;
397
398 /* Ensure async daemons disabled */
396 for (i = 0; i < NFS_MAXRAHEAD; i++) {
399 for (i = 0; i < NFS_MAXASYNCDAEMON; i++) {
397 ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
398 ncl_iodmount[i] = NULL;
399 }
400 ncl_iodwant[i] = NFSIOD_NOT_AVAILABLE;
401 ncl_iodmount[i] = NULL;
402 }
403 TASK_INIT(&ncl_nfsiodnew_task, 0, ncl_nfsiodnew_tq, NULL);
400 ncl_nhinit(); /* Init the nfsnode table */
401
402 return (0);
403}
404
404 ncl_nhinit(); /* Init the nfsnode table */
405
406 return (0);
407}
408